diff options
Diffstat (limited to 'lib/active_job')
-rw-r--r-- | lib/active_job/base.rb | 7 | ||||
-rw-r--r-- | lib/active_job/queue_adapters/inline_queue.rb | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/active_job/base.rb b/lib/active_job/base.rb index f2c76c1811..a404355026 100644 --- a/lib/active_job/base.rb +++ b/lib/active_job/base.rb @@ -1,4 +1,11 @@ +require 'active_job/queue_adapters/inline_queue' + module ActiveJob class Base + class << self + def enqueue(*args) + ActiveJob::QueueAdapters::InlineQueue.queue self, *args + end + end end end
\ No newline at end of file diff --git a/lib/active_job/queue_adapters/inline_queue.rb b/lib/active_job/queue_adapters/inline_queue.rb new file mode 100644 index 0000000000..dd80c6a5a3 --- /dev/null +++ b/lib/active_job/queue_adapters/inline_queue.rb @@ -0,0 +1,11 @@ +module ActiveJob + module QueueAdapters + class InlineQueue + class << self + def queue(job, *args) + job.perform *args + end + end + end + end +end
\ No newline at end of file |