Class: BackgroundJobs::QueueService

Inherits:
Object
  • Object
show all
Includes:
JobIdGenerator
Defined in:
lib/background_jobs/queue_service.rb

Class Method Summary collapse

Methods included from JobIdGenerator

included

Class Method Details

.enqueue(job_type, attributes = [], options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/background_jobs/queue_service.rb', line 8

def self.enqueue(job_type, attributes = [], options = {})
  job_id = generate_job_id

  job_queue = JobQueueFactory.build
  job_queue.enqueue(job_type, job_id, attributes, options)

  job_id
end