File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1
- ## 1.4.1 (2010-??-??)
1
+ ## 1.5.0 (2010-??-??)
2
2
3
+ * Version now included in procline, e.g. ` resque-1.5: Message `
3
4
* Web bugfix: Ignore idle works in the "working" page
4
5
5
6
## 1.4.0 (2010-02-11)
Original file line number Diff line number Diff line change @@ -115,14 +115,10 @@ def work(interval = 5, &block)
115
115
116
116
if @child = fork
117
117
rand # Reseeding
118
- procline = "resque: Forked #{ @child } at #{ Time . now . to_i } "
119
- $0 = procline
120
- log! procline
118
+ procline "Forked #{ @child } at #{ Time . now . to_i } "
121
119
Process . wait
122
120
else
123
- procline = "resque: Processing #{ job . queue } since #{ Time . now . to_i } "
124
- $0 = procline
125
- log! procline
121
+ procline "Processing #{ job . queue } since #{ Time . now . to_i } "
126
122
process ( job , &block )
127
123
exit! unless @cant_fork
128
124
end
@@ -131,7 +127,7 @@ def work(interval = 5, &block)
131
127
else
132
128
break if interval . to_i == 0
133
129
log! "Sleeping for #{ interval . to_i } "
134
- $0 = @paused ? "resque: Paused" : "resque: Waiting for #{ @queues . join ( ',' ) } "
130
+ procline @paused ? "Paused" : "Waiting for #{ @queues . join ( ',' ) } "
135
131
sleep interval . to_i
136
132
end
137
133
end
@@ -420,6 +416,11 @@ def worker_pids
420
416
end
421
417
end
422
418
419
+ def procline ( string )
420
+ $0 = "resque-#{ Resque ::Version } : #{ string } "
421
+ log! $0
422
+ end
423
+
423
424
# Log a message to STDOUT if we are verbose or very_verbose.
424
425
def log ( message )
425
426
if verbose
Original file line number Diff line number Diff line change 197
197
198
198
test "sets $0 while working" do
199
199
@worker . work ( 0 ) do
200
- assert_equal "resque: Processing jobs since #{ Time . now . to_i } " , $0
200
+ ver = Resque ::Version
201
+ assert_equal "resque-#{ ver } : Processing jobs since #{ Time . now . to_i } " , $0
201
202
end
202
203
end
203
204
You can’t perform that action at this time.
0 commit comments