We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ba33f5 commit d5c3403Copy full SHA for d5c3403
lib/resque/tasks.rb
@@ -5,7 +5,7 @@
5
task :setup
6
7
desc "Start a Resque worker"
8
- task :work => :setup do
+ task :work => [:pidfile, :setup] do
9
require 'resque'
10
11
queues = (ENV['QUEUES'] || ENV['QUEUE']).to_s.split(',')
@@ -26,10 +26,6 @@
26
Process.daemon(true)
27
end
28
29
- if ENV['PIDFILE']
30
- File.open(ENV['PIDFILE'], 'w') { |f| f << worker.pid }
31
- end
32
-
33
worker.log "Starting worker #{worker}"
34
35
worker.work(ENV['INTERVAL'] || 5) # interval, will block
0 commit comments