.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Minion::Command::minion::worker 3pm" .TH Minion::Command::minion::worker 3pm "2017-01-04" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Minion::Command::minion::worker \- Minion worker command .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& 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 \& \& Options: \& \-C, \-\-command\-interval Worker remote control command interval, \& defaults to 10 \& \-h, \-\-help Show this summary of available options \& \-\-home Path to home directory of your \& application, defaults to the value of \& MOJO_HOME or auto\-detection \& \-I, \-\-heartbeat\-interval Heartbeat interval, defaults to 60 \& \-j, \-\-jobs Number of jobs to perform \& concurrently, defaults to 4 \& \-m, \-\-mode Operating mode for your application, \& defaults to the value of \& MOJO_MODE/PLACK_ENV or "development" \& \-q, \-\-queue One or more queues to get jobs from, \& defaults to "default" \& \-R, \-\-repair\-interval Repair interval, defaults to 21600 \& (6 hours) .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Minion::Command::minion::worker starts a Minion worker. You can have as many workers as you like. .SH "SIGNALS" .IX Header "SIGNALS" The Minion::Command::minion::worker process can be controlled at runtime with the following signals. .SS "\s-1INT, TERM\s0" .IX Subsection "INT, TERM" Stop gracefully after finishing the current jobs. .SS "\s-1QUIT\s0" .IX Subsection "QUIT" Stop immediately without finishing the current jobs. .SH "REMOTE CONTROL COMMANDS" .IX Header "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. .SS "jobs" .IX Subsection "jobs" .Vb 2 \& $ ./myapp.pl minion job \-b jobs \-a \*(Aq[10]\*(Aq \& $ ./myapp.pl minion job \-b jobs \-a \*(Aq[10]\*(Aq 23 .Ve .PP Instruct one or more workers to change the number of jobs to perform concurrently. Setting this value to \f(CW0\fR will effectively pause the worker. That means all current jobs will be finished, but no new ones accepted, until the number is increased again. .SS "stop" .IX Subsection "stop" .Vb 2 \& $ ./myapp.pl minion job \-b stop \-a \*(Aq[10025]\*(Aq \& $ ./myapp.pl minion job \-b stop \-a \*(Aq[10025]\*(Aq 23 .Ve .PP 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. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" Minion::Command::minion::worker inherits all attributes from Mojolicious::Command and implements the following new ones. .SS "description" .IX Subsection "description" .Vb 2 \& my $description = $worker\->description; \& $worker = $worker\->description(\*(AqFoo\*(Aq); .Ve .PP Short description of this command, used for the command list. .SS "usage" .IX Subsection "usage" .Vb 2 \& my $usage = $worker\->usage; \& $worker = $worker\->usage(\*(AqFoo\*(Aq); .Ve .PP Usage information for this command, used for the help screen. .SH "METHODS" .IX Header "METHODS" Minion::Command::minion::worker inherits all methods from Mojolicious::Command and implements the following new ones. .SS "run" .IX Subsection "run" .Vb 1 \& $worker\->run(@ARGV); .Ve .PP Run this command. .SH "SEE ALSO" .IX Header "SEE ALSO" Minion, Mojolicious::Guides, .