diff --git a/README.md b/README.md index d556eac..811a2bd 100644 --- a/README.md +++ b/README.md @@ -114,10 +114,13 @@ SIGNALS The pool manager responds to the following signals: * `HUP` - reload the config file, reload logfiles, restart all workers. -* `QUIT` - send `QUIT` to each worker parent and shutdown the manager after all workers are done. -* `INT` - send `QUIT` to each worker parent and immediately shutdown manager -* `TERM` - send `TERM` to each worker parent and immediately shutdown manager -* `WINCH` - send `QUIT` to each worker, but keep manager running (send `HUP` to reload config and restart workers) +* `QUIT` - gracefully shut down workers (via `QUIT`) and shutdown the manager + after all workers are done. +* `INT` - gracefully shut down workers (via `QUIT`) and immediately shutdown manager +* `TERM` - immediately shut down workers (via `INT`) and immediately shutdown manager + _(configurable via command line options)_ +* `WINCH` - _(only when running as a daemon)_ send `QUIT` to each worker, but + keep manager running (send `HUP` to reload config and restart workers) * `USR1`/`USR2`/`CONT` - pass the signal on to all worker parents (see Resque docs). Use `HUP` to help logrotate run smoothly and to change the number of workers diff --git a/man/resque-pool.1 b/man/resque-pool.1 index 34756f1..58de76b 100644 --- a/man/resque-pool.1 +++ b/man/resque-pool.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "RESQUE\-POOL" "1" "May 2012" "RESQUE-POOL 0.3.0.DEV" "RESQUE-POOL" +.TH "RESQUE\-POOL" "1" "June 2012" "RESQUE-POOL 0.4.0.DEV" "RESQUE-POOL" . .SH "NAME" \fBresque\-pool\fR \- resque worker pool management @@ -21,6 +21,9 @@ When resque\-pool(1) is daemonized the \fBstdout\fR and \fBstderr\fR output stre \fB\-c, \-\-config\fR \fIfile\fR: Uses the configuration specified in the \fIfile\fR provided instead of searching in the current and \fBconfig\fR directories for \fBresque\-pool\.yml\fR\. . .IP "\(bu" 4 +\fB\-a, \-\-appname\fR \fIname\fR: Specifies the app name to be used for logging and procline\. If not specified, this defaults to the current working directory\. +. +.IP "\(bu" 4 \fB\-d, \-\-daemon\fR: Runs \fBresque\-pool\fR in the background as a daemon process\. This will redirect \fBstdout\fR and \fBstderr\fR to log files and write a PID file\. . .IP "\(bu" 4 @@ -30,7 +33,7 @@ When resque\-pool(1) is daemonized the \fBstdout\fR and \fBstderr\fR output stre \fB\-e, \-\-stderr\fR \fIfile\fR: Writes the standard error output to \fIfile\fR instead of printing to the terminal\. When running as a daemon this defaults to the path \fBlog/resque\-pool\.stderr\.log\fR\. . .IP "\(bu" 4 -\fB\-\-nosync\fR Allows writes to \fBstdout\fR and \fBstderr\fR to be buffered by the OS\. +\fB\-\-nosync\fR Allows writes to \fBstdout\fR and \fBstderr\fR to be buffered\. . .IP "\(bu" 4 \fB\-p, \-\-pidfile\fR \fIfile\fR: Writes the PID to the \fIfile\fR\. When running as a daemon this defaults to \fBtmp/pids/resque\-pool\.pid\fR\. @@ -39,7 +42,13 @@ When resque\-pool(1) is daemonized the \fBstdout\fR and \fBstderr\fR output stre \fB\-E, \-\-environment\fR \fIname\fR: Specifies the environment \fIname\fR to be set for \fBRAILS_ENV\fR, \fBRACK_ENV\fR and \fBRESQUE_ENV\fR which will be passed on to the pooled resque workers\. . .IP "\(bu" 4 -\fB\-a, \-\-appname\fR \fIname\fR: Specifies the app name to be used for logging and procline\. If not specified, this defaults to the current working directory\. +\fB\-\-term\-graceful\-wait\fR: Configure TERM signal handling so the master will gracefully request worker shut downs (via \fBQUIT\fR) and wait for the workers to quit before shutting down itself\. This is the same behavior as the \fBQUIT\fR signal\. +. +.IP "\(bu" 4 +\fB\-\-term\-graceful\fR: Configure TERM signal handling so the master will gracefully request worker shut downs (via \fBQUIT\fR) but shut itself down immediately\. This the same behavior as the \fBINT\fR signal\. +. +.IP "\(bu" 4 +\fB\-\-term\-immediate\fR: Configure TERM signal handling so the master will request imediate worker shut downs (via \fBINT\fR) and shut itself down immediately\. This is the default \fBTERM\fR signal behavior\. . .IP "" 0 . diff --git a/man/resque-pool.1.ronn b/man/resque-pool.1.ronn index b77a629..7d81c8c 100644 --- a/man/resque-pool.1.ronn +++ b/man/resque-pool.1.ronn @@ -20,6 +20,10 @@ directory. Uses the configuration specified in the provided instead of searching in the current and `config` directories for `resque-pool.yml`. + * `-a, --appname` : + Specifies the app name to be used for logging and procline. If not + specified, this defaults to the current working directory. + * `-d, --daemon`: Runs `resque-pool` in the background as a daemon process. This will redirect `stdout` and `stderr` to log files and write a PID file. @@ -35,7 +39,7 @@ directory. `log/resque-pool.stderr.log`. * `--nosync` - Allows writes to `stdout` and `stderr` to be buffered by the OS. + Allows writes to `stdout` and `stderr` to be buffered. * `-p, --pidfile` : Writes the PID to the . When running as a daemon this defaults @@ -45,9 +49,20 @@ directory. Specifies the environment to be set for `RAILS_ENV`, `RACK_ENV` and `RESQUE_ENV` which will be passed on to the pooled resque workers. - * `-a, --appname` : - Specifies the app name to be used for logging and procline. If not - specified, this defaults to the current working directory. + * `--term-graceful-wait`: + Configure TERM signal handling so the master will gracefully request worker + shut downs (via `QUIT`) and wait for the workers to quit before shutting + down itself. This is the same behavior as the `QUIT` signal. + + * `--term-graceful`: + Configure TERM signal handling so the master will gracefully request worker + shut downs (via `QUIT`) but shut itself down immediately. This the same + behavior as the `INT` signal. + + * `--term-immediate`: + Configure TERM signal handling so the master will request imediate worker + shut downs (via `INT`) and shut itself down immediately. This is the + default `TERM` signal behavior. ## HISTORY