Module: SidekiqBackgrounder
- Defined in:
- lib/sidekiq_backgrounder.rb,
lib/sidekiq_backgrounder/version.rb
Defined Under Namespace
Classes: Configuration, Error, Worker
Constant Summary collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
65 66 67 |
# File 'lib/sidekiq_backgrounder.rb', line 65 def configuration @configuration end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
83 84 85 86 |
# File 'lib/sidekiq_backgrounder.rb', line 83 def configure self.configuration ||= Configuration.new yield(configuration) end |
.queue(options = {}) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/sidekiq_backgrounder.rb', line 67 def queue( = {}) c = SidekiqBackgrounder.configuration .symbolize_keys! opts = %i(queue retry backtrace).inject({}) do |m, opt| m[opt] = c.public_send(opt) m[opt] = [opt] if .has_key?(opt) m end opts[:pool] = c.pool if c.pool.present? opts[:pool] = [:pool] if .has_key?(:pool).present? Worker.set(opts) end |