App::SuperviseMe - very simple command superviser
version 0.001
my $superviser = App::SuperviseMe->new( cmds => [ 'plackup -p 3010 ./sites/x/app.psgi', 'plackup -p 3011 ./sites/y/app.psgi', ], ); $superviser->run;
This module implements a multi-process supervisor.
It takes a list of commands to execute and starts each one, and then monitors their execution. If one of the program dies, the supervisor will restart it after a small 1 second pause.
my $supervisor = App::SuperviseMe->new( cmds => [...]);
Creates a supervisor instance with a list of commands to monitor.
It accepts a hash with the following options:
A list reference with the commands to execute and monitor.
my $supervisor = App::SuperviseMe->new_from_options;
Reads the list of commands to start and monitor from STDIN. It strips white-space from the beggining and end of the line, and skips lines that start with a #.
STDIN
#
Returns the superviser object.
$supervisor->run;
Starts the supervisor, start all the child processes and monitors each one.
This method returns when the supervisor is stopped with either a SIGINT or a SIGTERM.
AnyEvent
Pedro Melo <melo@simplicidade.org>
This software is Copyright (c) 2011 by Pedro Melo.
This is free software, licensed under:
The Artistic License 2.0
To install App::SuperviseMe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::SuperviseMe
CPAN shell
perl -MCPAN -e shell install App::SuperviseMe
For more information on module installation, please visit the detailed CPAN module installation guide.