- REMOTE CONTROL COMMANDS
- SEE ALSO
- COPYRIGHT AND LICENSE
Kevin::Command::kevin::worker - Alternative Minion worker command
Usage: APPLICATION kevin worker [OPTIONS] ./myapp.pl kevin worker ./myapp.pl kevin worker -f ./myapp.pl kevin worker -m production -I 15 -C 5 -R 3600 -j 10 ./myapp.pl kevin worker -q important -q default Options: -C, --command-interval <seconds> Worker remote control command interval, defaults to 10 -D, dequeue-timeout <seconds> Maximum amount of time to wait for jobs, defaults 5 -f, --fast-start Start processing jobs as fast as possible and skip repairing on startup -h, --help Show this summary of available options --home <path> Path to home directory of your application, defaults to the value of MOJO_HOME or auto-detection -I, --heartbeat-interval <seconds> Heartbeat interval, defaults to 300 -j, --jobs <number> Maximum number of jobs to perform parallel in forked worker processes, defaults to 4 -m, --mode <name> Operating mode for your application, defaults to the value of MOJO_MODE/PLACK_ENV or "development" -q, --queue <name> One or more queues to get jobs from, defaults to "default" -R, --repair-interval <seconds> Repair interval, up to half of this value can be subtracted randomly to make sure not all workers repair at the same time, defaults to 21600 (6 hours)
This is a fork of Minion::Command::minion::worker. The differences are:
During immediate stops, the worker stops sending heartbeats, processing remote commands and doing repairs.
During graceful stops, the worker stops doing repairs.
During a stop, when all jobs have finished, the worker will quit promptly (without sleeping).
Allow to disable repairs with
The Kevin::Command::kevin::worker process can be controlled at runtime with the following signals.
Stop gracefully after finishing the current jobs.
Stop immediately without finishing the current jobs.
$ ./myapp.pl minion job -b jobs -a '' $ ./myapp.pl minion job -b jobs -a '' 23
Instruct one or more workers to change the number of jobs to perform concurrently. Setting this value to
0 will effectively pause the worker. That means all current jobs will be finished, but no new ones accepted, until the number is increased again.
$ ./myapp.pl minion job -b stop -a '' $ ./myapp.pl minion job -b stop -a '' 23
Instruct one or more workers to stop a job that is currently being performed immediately. This command will be ignored by workers that do not have a job matching the id. That means it is safe to broadcast this command to all workers.
my $description = $worker->description; $worker = $worker->description('Foo');
Short description of this command, used for the command list.
my $usage = $worker->usage; $worker = $worker->usage('Foo');
Usage information for this command, used for the help screen.
Run this command.
You can set the
KEVIN_WORKER_TRACE environment variable to have some extra diagnostics information printed to
Adriano Ferreira <email@example.com>
This software is copyright (c) 2017 by Adriano Ferreira.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.