diff options
author | David Heinemeier Hansson <david@basecamp.com> | 2014-05-19 10:54:30 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@basecamp.com> | 2014-05-19 10:54:30 +0200 |
commit | e06e64efd3ebf6e3351cd490f55273bd2e756b0b (patch) | |
tree | ca007bcb42cf7a397c95de1926170ca9116c200e /lib/active_job | |
parent | fd1e61adfc40275fe23fdcbc7796f7a72bf12fa3 (diff) | |
parent | 6e18a7469fb43714c8a37e6cf6ff94280cd12465 (diff) | |
download | rails-e06e64efd3ebf6e3351cd490f55273bd2e756b0b.tar.gz rails-e06e64efd3ebf6e3351cd490f55273bd2e756b0b.tar.bz2 rails-e06e64efd3ebf6e3351cd490f55273bd2e756b0b.zip |
Merge pull request #9 from cristianbica/delayed_job_adapter
Implemented delayed_job support
Diffstat (limited to 'lib/active_job')
-rw-r--r-- | lib/active_job/queue_adapters/delayed_job_adapter.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/active_job/queue_adapters/delayed_job_adapter.rb b/lib/active_job/queue_adapters/delayed_job_adapter.rb new file mode 100644 index 0000000000..33229dece4 --- /dev/null +++ b/lib/active_job/queue_adapters/delayed_job_adapter.rb @@ -0,0 +1,13 @@ +require 'delayed_job' + +module ActiveJob + module QueueAdapters + class DelayedJobAdapter + class << self + def queue(job, *args) + job.delay(queue: job.queue_name).perform(*args) + end + end + end + end +end |