module QueueKit::Clients::CommandTimeout
Public Instance Methods
command_clients_size()
click to toggle source
# File lib/queue_kit/clients/command_timeout.rb, line 28 def command_clients_size 1 end
command_timeout(attempts = 0)
click to toggle source
# File lib/queue_kit/clients/command_timeout.rb, line 4 def command_timeout(attempts = 0) timeout = command_timeout_ms timeout += timeout * (attempts / command_clients_size).floor if timeout > (max = max_command_timeout_ms) timeout = max end timeout end
command_timeout_from(options)
click to toggle source
# File lib/queue_kit/clients/command_timeout.rb, line 15 def command_timeout_from(options) @command_timeout_ms = options[:command_timeout_ms] @max_command_timeout_ms = options[:max_command_timeout_ms] end
command_timeout_ms()
click to toggle source
# File lib/queue_kit/clients/command_timeout.rb, line 20 def command_timeout_ms @command_timeout_ms ||= 10 end
max_command_timeout_ms()
click to toggle source
# File lib/queue_kit/clients/command_timeout.rb, line 24 def max_command_timeout_ms @max_command_timeout_ms ||= 1000 end