Method: Redis#migrate
- Defined in:
- lib/redis.rb
#migrate(key, options) ⇒ String
Transfer a key from the connected instance to another instance.
399 400 401 402 403 404 405 406 407 408 |
# File 'lib/redis.rb', line 399 def migrate(key, ) host = [:host] || raise(RuntimeError, ":host not specified") port = [:port] || raise(RuntimeError, ":port not specified") db = ([:db] || client.db).to_i timeout = ([:timeout] || client.timeout).to_i synchronize do |client| client.call([:migrate, host, port, key, db, timeout]) end end |