1Minion::Command::minionU:s:ewrorCkoenrt(r3i)buted Perl DMoicnuimoenn:t:aCtoimomnand::minion::worker(3)
2
3
4

NAME

6       Minion::Command::minion::worker - Minion worker command
7

SYNOPSIS

9         Usage: APPLICATION minion worker [OPTIONS]
10
11           ./myapp.pl minion worker
12           ./myapp.pl minion worker -m production -I 15 -C 5 -R 3600 -j 10
13           ./myapp.pl minion worker -q important -q default
14
15         Options:
16           -C, --command-interval <seconds>     Worker remote control command interval,
17                                                defaults to 10
18           -D, dequeue-timeout <seconds>        Maximum amount of time to wait for
19                                                jobs, defaults to 5
20           -h, --help                           Show this summary of available options
21               --home <path>                    Path to home directory of your
22                                                application, defaults to the value of
23                                                MOJO_HOME or auto-detection
24           -I, --heartbeat-interval <seconds>   Heartbeat interval, defaults to 300
25           -j, --jobs <number>                  Maximum number of jobs to perform
26                                                parallel in forked worker processes,
27                                                defaults to 4
28           -m, --mode <name>                    Operating mode for your application,
29                                                defaults to the value of
30                                                MOJO_MODE/PLACK_ENV or "development"
31           -q, --queue <name>                   One or more queues to get jobs from,
32                                                defaults to "default"
33           -R, --repair-interval <seconds>      Repair interval, up to half of this
34                                                value can be subtracted randomly to
35                                                make sure not all workers repair at the
36                                                same time, defaults to 21600 (6 hours)
37

DESCRIPTION

39       Minion::Command::minion::worker starts a Minion worker. You can have as
40       many workers as you like.
41

WORKER SIGNALS

43       The Minion::Command::minion::worker process can be controlled at
44       runtime with the following signals.
45
46   INT, TERM
47       Stop gracefully after finishing the current jobs.
48
49   QUIT
50       Stop immediately without finishing the current jobs.
51

JOB SIGNALS

53       The job processes spawned by the Minion::Command::minion::worker
54       process can be controlled at runtime with the following signals.
55
56   INT
57       This signal starts out with the operating system default and allows for
58       jobs to install a custom signal handler to stop gracefully.
59
60   USR1, USR2
61       These signals start out being ignored and allow for jobs to install
62       custom signal handlers.
63

REMOTE CONTROL COMMANDS

65       The Minion::Command::minion::worker process can be controlled at
66       runtime through Minion::Command::minion::job, from anywhere in the
67       network, by broadcasting the following remote control commands.
68
69   jobs
70         $ ./myapp.pl minion job -b jobs -a '[10]'
71         $ ./myapp.pl minion job -b jobs -a '[10]' 23
72
73       Instruct one or more workers to change the number of jobs to perform
74       concurrently. Setting this value to 0 will effectively pause the
75       worker. That means all current jobs will be finished, but no new ones
76       accepted, until the number is increased again.
77
78   kill
79         $ ./myapp.pl minion job -b kill -a '["INT", 10025]'
80         $ ./myapp.pl minion job -b kill -a '["INT", 10025]' 23
81
82       Instruct one or more workers to send a signal to a job that is
83       currently being performed. This command will be ignored by workers that
84       do not have a job matching the id. That means it is safe to broadcast
85       this command to all workers.
86
87   stop
88         $ ./myapp.pl minion job -b stop -a '[10025]'
89         $ ./myapp.pl minion job -b stop -a '[10025]' 23
90
91       Instruct one or more workers to stop a job that is currently being
92       performed immediately. This command will be ignored by workers that do
93       not have a job matching the id. That means it is safe to broadcast this
94       command to all workers.
95

ATTRIBUTES

97       Minion::Command::minion::worker inherits all attributes from
98       Mojolicious::Command and implements the following new ones.
99
100   description
101         my $description = $worker->description;
102         $worker         = $worker->description('Foo');
103
104       Short description of this command, used for the command list.
105
106   usage
107         my $usage = $worker->usage;
108         $worker   = $worker->usage('Foo');
109
110       Usage information for this command, used for the help screen.
111

METHODS

113       Minion::Command::minion::worker inherits all methods from
114       Mojolicious::Command and implements the following new ones.
115
116   run
117         $worker->run(@ARGV);
118
119       Run this command.
120

SEE ALSO

122       Minion, Mojolicious::Guides, <https://mojolicious.org>.
123
124
125
126perl v5.30.0                      2019-09-01Minion::Command::minion::worker(3)
Impressum