class Redis
def blmove(source, destination, where_source, where_destination, timeout: 0)
-
(nil, String)
- the element, or nil when the source key does not exist or the timeout expired
Parameters:
-
options
(Hash
) -- -
where_destination
(String, Symbol
) -- where to push the element to the source list -
where_source
(String, Symbol
) -- from where to remove the element from the source list -
destination
(String
) -- destination key -
source
(String
) -- source key
Other tags:
- Example: Without timeout -
Example: With timeout -
def blmove(source, destination, where_source, where_destination, timeout: 0) where_source, where_destination = _normalize_move_wheres(where_source, where_destination) synchronize do |client| command = [:blmove, source, destination, where_source, where_destination, timeout] timeout += client.timeout if timeout > 0 client.call_with_timeout(command, timeout) end end