diff options
Diffstat (limited to 'activejob/lib/active_job/queue_adapters/inline_adapter.rb')
-rw-r--r-- | activejob/lib/active_job/queue_adapters/inline_adapter.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activejob/lib/active_job/queue_adapters/inline_adapter.rb b/activejob/lib/active_job/queue_adapters/inline_adapter.rb new file mode 100644 index 0000000000..5805340fb0 --- /dev/null +++ b/activejob/lib/active_job/queue_adapters/inline_adapter.rb @@ -0,0 +1,15 @@ +module ActiveJob + module QueueAdapters + class InlineAdapter + class << self + def enqueue(job, *args) + job.new.execute(*args) + end + + def enqueue_at(*) + raise NotImplementedError.new("Use a queueing backend to enqueue jobs in the future. Read more at https://github.com/rails/activejob") + end + end + end + end +end |