File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -267,9 +267,10 @@ worker process. Use the PIDFILE option for easy access to the PID:
267
267
268
268
### Running in the background
269
269
270
- There are scenarios where it's helpful for the resque worker to run
271
- itself in the background (usually in combination with PIDFILE). Use the
272
- BACKGROUND option so that rake will return as soon as the worker is started.
270
+ (Only supported with ruby >= 1.9). There are scenarios where it's helpful for
271
+ the resque worker to run itself in the background (usually in combination with
272
+ PIDFILE). Use the BACKGROUND option so that rake will return as soon as the
273
+ worker is started.
273
274
274
275
$ PIDFILE=./resque.pid BACKGROUND=yes QUEUE=file_serve \
275
276
rake environment resque:work
Original file line number Diff line number Diff line change 19
19
end
20
20
21
21
if ENV [ 'BACKGROUND' ]
22
+ unless Process . respond_to? ( 'daemon' )
23
+ abort "env var BACKGROUND is set, which requires ruby >= 1.9"
24
+ end
22
25
Process . daemon ( true )
23
26
end
24
27
You can’t perform that action at this time.
0 commit comments