Class: Secondhand::Job::Factory

Inherits:
Object
  • Object
show all
Includes:
JobFactory, Singleton
Defined in:
lib/secondhand/job.rb

Overview

Create custom JobFactory to hand out jobs from a Ruby collection and not from the Quartz job list. Avoids problems with JRuby and interfaces to and from Ruby.

Instance Method Summary collapse

Instance Method Details

#new_job(event) ⇒ Object

Quartz calls new_job on the factory to get the job details

* event = execution-time data about the job (from Quartz)


51
52
53
54
# File 'lib/secondhand/job.rb', line 51

def new_job(event)      
  # Get a job from the factory - Quartz calls #execute(context) on this      
  event.get_job_detail.job  
end