Minion:...::worker(3)
π NAME π
Minion::Command::minion::worker β bestie, this is the Minion worker command β¨ it's the thing that actually gets up and does the jobs while everyone else is asleep π
Oh and hi, this whole page is from the User Contributed Perl Documentation section 3, so like. Minion::Command::minion::worker(3). Now you know π«Ά
β¨ SYNOPSIS β¨
Okay so the vibe is:
Usage: APPLICATION minion worker [OPTIONS]
./myapp.pl minion worker
./myapp.pl minion worker -m production -I 15 -C 5 -R 3600 -j 10
./myapp.pl minion worker -q important -q default
./myapp.pl minion worker -L foo=2 -L bar=5
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 to 5
-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
(not including spare processes),
defaults to 4
-L, --limit <name>=<number> Limit number of jobs for a specific
task
-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)
-s, --spare <number> Number of spare worker processes to
reserve for high priority jobs,
defaults to 1
-S, --spare-min-priority <number> Minimum priority of jobs to use spare
worker processes for, defaults to 1
Like, just look at it. Iconic. π₯
πΈ DESCRIPTION πΈ
Minion::Command::minion::worker starts a Minion worker. And the best part?? You can have as many workers as you like. No cap. Go feral. Have 200. The Minion does not care π
π WORKER SIGNALS π
So the Minion::Command::minion::worker process can be controlled at runtime with these signals. Little remote controls for your worker, basically πΉοΈ
INT, TERM
Stop gracefully after finishing the current jobs. So polite. She's finishing her plate before she leaves the table π½οΈβ¨
QUIT
Stop immediately without finishing the current jobs. Okay dramatic queen, leaving mid-sentence, we respect it π
π¦ JOB SIGNALS π¦
And the job processes that get spawned by the Minion::Command::minion::worker process? They've got their own runtime controls too, bestie.
INT, TERM
This signal starts out with the operating system default and allows for jobs to install a custom signal handler to stop gracefully. So it's giving "default for now, but you can customize" π
USR1, USR2
These signals start out being ignored and allow for jobs to install custom signal handlers. Just sitting there, vibing, waiting for you to give them a purpose π
π REMOTE CONTROL COMMANDS π
The Minion::Command::minion::worker process can be controlled at runtime through Minion::Command::minion::job, from anywhere in the network, by broadcasting the following remote control commands. Yes, ANYWHERE. Main character energy fr fr π
jobs
$ ./myapp.pl minion job -b jobs -a '[10]'
$ ./myapp.pl minion job -b jobs -a '[10]' 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. Note that "spare" might need to be adjusted if high priority jobs should be paused as well. So like, zero means "finish your homework then go to bed", not "stop existing" π΄
kill
$ ./myapp.pl minion job -b kill -a '["INT", 10025]'
$ ./myapp.pl minion job -b kill -a '["INT", 10025]' 23
Instruct one or more workers to send a signal to a job that is currently being performed. 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. So you can just yell it into the void and only the right one will hear you π«Ά
spare
$ ./myapp.pl minion job -b spare -a '[1]'
$ ./myapp.pl minion job -b spare -a '[1]' 23
Instruct one or more workers to change the number of spare worker processes to reserve for high priority jobs. Setting this value to 0 will effectively disable the feature, this is required to pause the worker. That means all current high priority jobs will be finished, but no new ones accepted, until the number is increased again. So the spare count is like the VIP line at the club and setting it to 0 closes the velvet rope π
stop
$ ./myapp.pl minion job -b stop -a '[10025]'
$ ./myapp.pl minion job -b stop -a '[10025]' 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. Again β shout it everywhere, only the matching worker reacts π
π ATTRIBUTES π
Minion::Command::minion::worker inherits all attributes from Mojolicious::Command and implements the following new ones. Passing down the family traits, love that for her πΈ
description
my $description = $worker->description;
$worker = $worker->description('Foo');
Short description of this command, used for the command list. It's the little bio in her profile β¨
usage
my $usage = $worker->usage;
$worker = $worker->usage('Foo');
Usage information for this command, used for the help screen. That's the "how do I even use this" text π«Ά
β METHODS β
Minion::Command::minion::worker inherits all methods from Mojolicious::Command and implements the following new ones. Yep, all of them. Generational talent π
run
$worker->run(@ARGV);
Run this command. That's it. That's the method. Periodt π
π SEE ALSO π
MinionMinion::Guide- <https://minion.pm>
Mojolicious::Guides- <https://mojolicious.org>
Go read those too, bestie, they're literally so good πβ¨
Okay that's the whole page!! This one's from perl v5.42.0 and it was dated 2026-01-17, so like... very now of her. Anyway ily, go run some jobs, drink water, and remember: finish your current jobs before you QUIT π
ππ¦
π¦ where this page comes from
- fedora 44: perl-Minion 11.0-2.fc44 Β· Artistic-2.0 AND CC-BY-SA-4.0 AND MIT AND ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms