NAME
Helios::Stub - Helios::Worker subclass to handle [job type here] jobs
DESCRIPTION
This is a stub class to use as a guide to create new job types for the Helios system (ie new Helios::Worker subclasses).
TheSchwartz METHODS
The following methods are actually class methods that override those defined by the TheSchwartz queuing system. By overriding them, you define how your jobs will run in the Helios system and what actions will be performed.
The max_retries() and retry_delay() methods determines how many times a job is to be retried if it fails, and the amount of time to wait before the job is to be retried (in seconds). If you want your jobs to be retried twice (for 3 total run attempts) and to wait at least an hour before they are reattempted, you would define max_retries() and retry_delay() thusly:
sub max_retries { return 2; }
sub retry_delay { return 3600; }
TheSchwartz default is to not retry, with no retry delay, so if that's what you want, comment out the following sub definitions.
work()
The work() method is called as a class method. It does the typical prep work for a Helios worker, parses the arguments for the TheSchwartz::Job object it was passed, does the necessary work, and then marks the job as succeeded or failed.
SEE ALSO
AUTHOR
Andrew Johnson, <ajohnson@ittoolbox.com>
COPYRIGHT AND LICENSE
Copyright (C) 2007-8 by CEB Toolbox, Inc.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.
WARRANTY
This software comes with no warranty of any kind.