ObjStore::Job - Jobs for a Non-Preemptive Idle-Time Job Scheduler
Add an ObjStore::Job::Table to your database.
ObjStore::Job::Table
Sub-class ObjStore::Job and override the do_work method.
ObjStore::Job
do_work
package ObjStore::Job use ObjStore::Mortician;
Maybe all jobs should have delayed destruction by default.
R running L infinite loop detected S sleeping - will retry every second T suspended D done K killed
HIGH PRIORITY <= 0
Allowed to consume all available pizza slices.
TIME-SLICED 1-20
Given pizza slices proportional to the priority until either all the pizza slices are consumed or all the jobs are asleep (feasts induce slumber :-).
IDLE > 20
Given all remaining pizza slices.
The whole scheduling operation occurs within a single transaction. While this means that any job can kill the entire transaction, this seems a better choice than wrapping every job in its own mini-transaction. Since transactions are relatively expensive, it is hoped that most of the time all jobs will complete without error.
Too bad you can't store CODEREFs in the database.
Time does not necessarily transmute into pizza.
To install ObjStore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ObjStore
CPAN shell
perl -MCPAN -e shell install ObjStore
For more information on module installation, please visit the detailed CPAN module installation guide.