aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/queue_adapters/inline_adapter.rb
blob: 5805340fb08d37487f1a14b28ae6dcf5361d1fb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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