2014-05-18 07:10:34 -04:00
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
2014-05-18 07:10:34 -04:00
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 )
2014-05-18 07:10:34 -04:00
end
2014-05-19 18:27:28 -04:00
2014-09-21 16:20:23 -04:00
def enqueue_at ( * ) #:nodoc:
2014-10-08 10:24:16 -04:00
raise NotImplementedError . new ( " Use a queueing backend to enqueue jobs in the future. Read more at http://guides.rubyonrails.org/v4.2.0/active_job_basics.html " )
2014-05-19 18:27:28 -04:00
end
2014-05-18 07:10:34 -04:00
end
end
end
2014-05-19 18:27:28 -04:00
end