Class: Redis::Cluster::OrchestrationCommandNotSupported

Inherits:
BaseError
  • Object
show all
Defined in:
lib/redis/cluster.rb

Overview

Raised when client connected to redis as cluster mode and some cluster subcommands were called.

Instance Method Summary collapse

Constructor Details

#initialize(command, subcommand = '') ⇒ OrchestrationCommandNotSupported

Returns a new instance of OrchestrationCommandNotSupported.



15
16
17
18
19
20
21
22
# File 'lib/redis/cluster.rb', line 15

def initialize(command, subcommand = '')
  str = [command, subcommand].map(&:to_s).reject(&:empty?).join(' ').upcase
  msg = "#{str} command should be used with care "\
        'only by applications orchestrating Redis Cluster, like redis-trib, '\
        'and the command if used out of the right context can leave the cluster '\
        'in a wrong state or cause data loss.'
  super(msg)
end