Class that manages persistency of jobs classes as an ActiveRecord
An example shell job class Overrides set_command method using ‘path’ virtual attribute Ex:
ExampleShellJob.run_async(:path => '.')
UbiquoJobs.manager.get('runner').run!
will execute
ls .
An example job class It simply calculates a Array.size, overriding do_job_work Passes the required arguments using the options hash Ex:
ExampleJob.run_async(:options => {:set => [1,2]})
UbiquoJobs.manager.get('runner').run!
will execute
Model.count
to display the results use job.output_log
Module to be included to simplify creation of jobs that execute a command The command to execute is stored in the ‘command’ field. Each Job implementation that wants to enable ShellJob has therefore to allocate this ‘command’ accessor
Return the manager class to use. You can override the default by setting the :job_manager_class in ubiquo config:
Ubiquo::Config.context(:ubiquo_jobs).set(
:job_manager_class,
UbiquoJobs::Managers::ActiveManager
)
# File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs.rb, line 12
12: def self.manager
13: Ubiquo::Config.context(:ubiquo_jobs).get(:job_manager_class)
14: end
Return the notifier class to use. You can override the default by using the :job_notifier_class in ubiquo config:
Ubiquo::Config.context(:ubiquo_jobs).set(
:job_notifier_class,
UbiquoJobs::Helpers::Notifier
)
# File vendor/plugins/ubiquo_jobs/lib/ubiquo_jobs.rb, line 22
22: def self.notifier
23: Ubiquo::Config.context(:ubiquo_jobs).get(:job_notifier_class)
24: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.