in reply to Mechanisms for Fault-Tolerant Perl Scripting
Seriously.
Keep a small table of open jobs in a database table. For each step open a transaction, select a job, and attempt to do one step. If you succeed update the table with the new information about what comes next and commit the transaction. If you fail send email and rollback the transaction. Should you crash unexpectedly, it is up to the database to ensure that there is a reliable record of your current state.
Just be sure that each of your labelled steps is one which from the time you open a transaction to the time you commit it, can be restarted from scratch without penalty.
Should you wish to create a log of your actions, that log can be kept in the database as well.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re (tilly) 1: Mechanisms for Fault-Tolerant Perl Scripting
by princepawn (Parson) on Oct 09, 2000 at 20:50 UTC | |
by tilly (Archbishop) on Oct 09, 2000 at 21:26 UTC |