Module: ActiveJob::Plugins::Resque::Solo::ClassMethods
- Defined in:
- lib/active_job/plugins/resque/solo.rb
Instance Method Summary collapse
- #solo_except_args(*args) ⇒ Object
- #solo_inspector ⇒ Object
- #solo_lock_key_prefix(key_prefix) ⇒ Object
- #solo_only_args(*args) ⇒ Object
Instance Method Details
#solo_except_args(*args) ⇒ Object
22 23 24 25 |
# File 'lib/active_job/plugins/resque/solo.rb', line 22 def solo_except_args(*args) @solo_except_args = args.compact.map(&:to_s).uniq raise ArgumentError, "solo_except_args requires one or more field names" if @solo_except_args.empty? end |
#solo_inspector ⇒ Object
27 28 29 |
# File 'lib/active_job/plugins/resque/solo.rb', line 27 def solo_inspector @solo_inspector ||= Inspector.new(@solo_only_args, @solo_except_args, @solo_lock_key_prefix) end |
#solo_lock_key_prefix(key_prefix) ⇒ Object
31 32 33 34 35 |
# File 'lib/active_job/plugins/resque/solo.rb', line 31 def solo_lock_key_prefix(key_prefix) @solo_lock_key_prefix = key_prefix.strip raise ArgumentError, "solo_lock_key_prefix cannot be blank or only spaces." if @solo_lock_key_prefix.blank? end |
#solo_only_args(*args) ⇒ Object
17 18 19 20 |
# File 'lib/active_job/plugins/resque/solo.rb', line 17 def solo_only_args(*args) @solo_only_args = args.compact.map(&:to_s).uniq raise ArgumentError, "solo_only_args requires one or more field names" if @solo_only_args.empty? end |