Revision history for Perl extension Schedule::Depend
(most recent first).
0.11
- Stamped out some doc bugs. Mainly that the
required argument is "sched" not "depend".
-
0.10 Thu Apr 11 14:16:40 CDT 2002
- Update unlias to search for $que->can( $job ) or
__PACKAGE__ . '::job', using closures to call
the method/sub with the aliased string as an
argument. This allows scheduling of methods or
subs by name without any modification to the
S::D code.
The mechanism for finding sub's is to unalis the
jobname first, look for the ->can or CODE ref
and pass it the original jobname if it's found.
Thus:
abc : foo
xyz : foo
bar : foo
bar : abc xyz
to call foo('abc'), foo('xyz') and foo('bar').
This might be useful for, say, cleaning up multiple
directories. To pass more informaiton just use
the arguments as hash keys into a package/global
value with the extra info.
- Assigning an empty or 'PHONY' alias is a noop.
Thus:
foo =
or
foo = PHONY
Will insert an immediate return of zero job into
the schedule. This is mainly to neaten things up:
foo =
foo : long_named_job_one
foo : even_longer_named_job_two
foo : something_you_surely_do_not_want_to_type
bar : foo
now bar depends on all of the other three jobs without
the line-from-hell in the middle of a schedule. This can
also be handy for generating schedules on the fly, where
bar is a placeholder and the others are pushed onto a
stack if they are needed.
- Doc updates.
0.09
Put the tarball into a tarball rahter than
cpio archive, no change to the code.
0.08 Fri Apr 5 10:10:08 CST 2002
- Added runjob to handle the result of unalias
after the fork. If the unaliased scalar is a
code reference then it exits with the result
of &$job; otherwise exec's $job.
Using an unalias with:
no strict 'refs';
\&$job
to expand the tag from the scheule allows
queueing subroutines -- or a mixture of
subroutines and shell execs. This could also
return a closure to push evaluation parameters
even later into the cycle (or for testing).
See notes for unalias & runjob for examples.
- Added switch for handling failed jobs without
aborting the queue. This offers the same effect
as "make -k". If "noabort => true" is passed
into prepare then jobs that fail will have their
dependencies marked for skipping and the pidfiles
will get a nastygram + exit status of -1 (i.e.,
they will be re-executed on a restart).
The noabort code doesn't seem to break anything,
but has not been fully tested (yet).
- pidfile and output directories can be passed in with the arguments,
picked up from the environment or default to the current
executable's directory name. the environment method can be
handy for the single-argument version.
- Serious updates to pod and comments.
0.07
Default for $que->{alias}{logdir} and {rundir}
are "dirname $0". Simplifies running multpile
copies of the same file and schedule from
different directories via soft link.
Revised exit status writing. The child uses
system instead of exec and writes $? to its
own pidfile; the parent writes $? to the pidfile
if it is non-zero. This allows either the parent
or child to get zapped by a signal, leave the
other running and correctly record the status.
It also means that the pidfiles may be 4 lines
long on failure. Fix there is to read [0..2]
to check the status on the way in for restarts.
Updated comments to reflect reality a bit better.
0.06
Remove some of the extra newlines -- they aren't
required since individual job output goes to
stdout/stderr files.
Shuffled verobse prints to a bit to give saner
combinatins of output. At this point test.log
should give a reasonable idea of what slient,
progress and detailed output look like.
Process verbose as an alias for setting verbosity.
Add sanity check for odd number of arg's > 1
in prepare. Makes it harder to zap thyself by
adding "verbose => X" after a single-value
schedule entry.
test.pl checks for forkatotis in the module by
comparing the initial pid running test.pl with
what's running after the test_blah call; croaks
if the pid has changed since test.pl startup.
Updated comments, pod to reflect the changes
since 0.03.
Note: Still need to come up with a reasonable
definition for processing the debug alias/arg
during prepare and execution. It may require
debug levels like: 1 => don't fork, 2 => also
don't check or write pidfiles. Problem there
is making sure that mixing $que->debug with
$que->prepare( ... debug => X ) doesn't cause
unnecessary errors.
0.05:
Output of individual jobs goes to $logdir/$job.out
and $logdir/$job.err. Main purpose is to keep the
top-level schedule logs clean.
test.pl puts stdout to test.log -- saves a lotta
stuff flying by on make test.
verbose and debug arg's to prepare and execute
are independent (i.e, you can now debug in silent
mode and get minimal output).
0.04 Fri Mar 1 13:52:34 CST 2002
debug uses copy of queue, doesn't consume original
object during debug, returns original object if
debug is successful. see comments for use.
updated verbose handling, now has three levels: 0, 1, 2.
0 == stop/start messages and nastygrams, 1 == progress
messages from fork/reap; 2 == fairly detailed. $q->{verbose}
overrides the debug switch; no verbose setting w/ debug
gives verbose == 2. added description of changes to POD.
all verbose-controlled output goes to STDOUT, nastygrams
and que start/complete messages to STDERR.
doc updates to reflect changes in verbosity.
0.03 Wed Feb 27 12:20:18 CST 2002
Doc updates.
test.pl updated.
0.02 Wed Feb 6 17:25:02 CST 2002
Release-able version.
0.01 Wed Feb 6 10:20:32 2002
Beta