Class: ActiveJob::QueueAdapters::HacklerAdapter

Inherits:
AbstractAdapter
  • Object
show all
Defined in:
lib/active_job/queue_adapters/hackler_adapter.rb

Instance Method Summary collapse

Instance Method Details

#enqueue(job) ⇒ Object



6
7
8
9
# File 'lib/active_job/queue_adapters/hackler_adapter.rb', line 6

def enqueue(job)
  j = Hackler::Job.create(data: JSON.dump(job.serialize))
  notify_worker(j)
end

#enqueue_at(job, timestamp) ⇒ Object



11
12
13
14
# File 'lib/active_job/queue_adapters/hackler_adapter.rb', line 11

def enqueue_at(job, timestamp)
  j = Hackler::Job.create(data: JSON.dump(job.serialize))
  notify_worker(j, timestamp)
end