Class: Sidekiqable::Configuration
- Inherits:
-
Object
- Object
- Sidekiqable::Configuration
- Defined in:
- lib/sidekiqable/configuration.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
Returns the value of attribute backtrace.
-
#dead ⇒ Object
Returns the value of attribute dead.
-
#pool ⇒ Object
Returns the value of attribute pool.
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#retry ⇒ Object
Returns the value of attribute retry.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#validate_arguments ⇒ Object
Returns the value of attribute validate_arguments.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #sidekiq_options ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 |
# File 'lib/sidekiqable/configuration.rb', line 7 def initialize @queue = "default" @retry = true @dead = true @backtrace = false @pool = nil @tags = nil @validate_arguments = true end |
Instance Attribute Details
#backtrace ⇒ Object
Returns the value of attribute backtrace.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def backtrace @backtrace end |
#dead ⇒ Object
Returns the value of attribute dead.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def dead @dead end |
#pool ⇒ Object
Returns the value of attribute pool.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def pool @pool end |
#queue ⇒ Object
Returns the value of attribute queue.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def queue @queue end |
#retry ⇒ Object
Returns the value of attribute retry.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def retry @retry end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def @tags end |
#validate_arguments ⇒ Object
Returns the value of attribute validate_arguments.
5 6 7 |
# File 'lib/sidekiqable/configuration.rb', line 5 def validate_arguments @validate_arguments end |
Instance Method Details
#sidekiq_options ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sidekiqable/configuration.rb', line 17 def {}.tap do |opts| opts[:queue] = queue if queue opts[:retry] = @retry unless @retry.nil? opts[:dead] = dead unless dead.nil? opts[:backtrace] = backtrace unless backtrace.nil? opts[:pool] = pool if pool opts[:tags] = if end end |