1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activejob/lib/active_job/queue_adapters/inline_adapter.rb

24 lines
674 B
Ruby
Raw Normal View History

2017-07-09 13:49:52 -04:00
# frozen_string_literal: true
module ActiveJob
module QueueAdapters
2014-09-21 16:20:23 -04:00
# == Active Job Inline adapter
#
# When enqueuing jobs with the Inline adapter the job will be executed
2014-09-21 16:20:23 -04:00
# immediately.
#
# To use the Inline set the queue_adapter config to +:inline+.
#
# Rails.application.config.active_job.queue_adapter = :inline
class InlineAdapter
def enqueue(job) #:nodoc:
Base.execute(job.serialize)
end
def enqueue_at(*) #:nodoc:
raise NotImplementedError, "Use a queueing backend to enqueue jobs in the future. Read more at http://guides.rubyonrails.org/active_job_basics.html"
end
end
end
end