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
672 B
Ruby
Raw Normal View History

module ActiveJob
module QueueAdapters
2014-09-21 16:20:23 -04:00
# == Active Job Inline adapter
#
# When enqueueing jobs with the Inline adapter the job will be executed
# immediately.
#
# To use the Inline set the queue_adapter config to +:inline+.
#
# Rails.application.config.active_job.queue_adapter = :inline
class InlineAdapter
class << self
2014-09-21 16:20:23 -04:00
def enqueue(job) #:nodoc:
2014-08-25 10:34:50 -04:00
Base.execute(job.serialize)
end
2014-09-21 16:20:23 -04:00
def enqueue_at(*) #:nodoc:
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