Module: ResqueExtensions
- Defined in:
- lib/resque_extensions.rb,
lib/resque_extensions/version.rb,
lib/resque_extensions/async_method.rb
Defined Under Namespace
Modules: ObjectMethods Classes: AsyncMethod
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
-
.async ⇒ Object
Whether or not we should be running asynchronously.
-
.async=(new_val) ⇒ Object
Whether or not we should be running asynchronously.
- .enqueue_class_method(klass, *args) ⇒ Object
Class Method Details
.async ⇒ Object
Whether or not we should be running asynchronously
10 11 12 13 14 15 16 17 |
# File 'lib/resque_extensions.rb', line 10 def self.async # if we have never set @async, we default # to true if @async.nil? @async = true end return @async end |
.async=(new_val) ⇒ Object
Whether or not we should be running asynchronously
25 26 27 |
# File 'lib/resque_extensions.rb', line 25 def self.async=(new_val) @async = new_val end |
.enqueue_class_method(klass, *args) ⇒ Object
29 30 31 32 |
# File 'lib/resque_extensions.rb', line 29 def self.enqueue_class_method(klass, *args) klass = "#{AsyncMethod::CLASS_PREFIX}#{klass}" AsyncMethod.new(klass, *args).enqueue! end |