Mojo::Server::DaemonControl::Worker - A Mojolicious daemon that can shutdown gracefully
use Mojo::Server::DaemonControl::Worker; my $daemon = Mojo::Server::DaemonControl::Worrker->new(listen => ['http://*:8080']); $daemon->run;
Mojo::Server::DaemonControl::Worker is a sub class of Mojo::Server::Daemon, that is used by Mojo::Server::DaemonControl to support graceful shutdown and hot deployment.
The Mojo::Server::DaemonControl::Worker process can be controlled by the same signals as Mojo::Server::Daemon, but it also supports the following signals.
Used to shut down the server gracefully.
Mojo::Server::DaemonControl::Worker inherits all events from Mojo::Server::Daemon.
Mojo::Server::DaemonControl::Worker inherits all attributes from Mojo::Server::Daemon and implements the following ones.
$int = $daemon->heartbeat_interval; $daemon = $daemon->heartbeat_interval(2.5);
Heartbeat interval in seconds. See "heartbeat_interval" in Mojo::Server::DaemonControl::Worker for more details.
$int = $daemon->manager_pid;
Holds the PID of the Mojo::Server::DaemonControl process.
$bool = $daemon->silent; $daemon = $daemon->silent(1);
Changes the default in "silent" in Mojo::Server::Daemon to 1.
Mojo::Server::DaemonControl::Worker inherits all methods from Mojo::Server::Daemon and implements the following ones.
$daemon->run($app);
Load $app using "load_app" in Mojo::Server and run server and wait for "SIGNALS".
$app
Mojo::Server::DaemonControl.
To install Mojo::Server::DaemonControl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::Server::DaemonControl
CPAN shell
perl -MCPAN -e shell install Mojo::Server::DaemonControl
For more information on module installation, please visit the detailed CPAN module installation guide.