Skip to content

Commit

Permalink
Some additional missing Version => VERSION conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Nov 4, 2021
1 parent 872f1bb commit 085f77e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/resque/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def solaris_worker_pids
`ps -A -o pid,comm | grep "[r]uby" | grep -v "resque-web"`.split("\n").map do |line|
real_pid = line.split(' ')[0]
pargs_command = `pargs -a #{real_pid} 2>/dev/null | grep [r]esque | grep -v "resque-web"`
if pargs_command.split(':')[1] == " resque-#{Resque::Version}"
if pargs_command.split(':')[1] == " resque-#{Resque::VERSION}"
real_pid
end
end.compact
Expand All @@ -862,7 +862,7 @@ def solaris_worker_pids
# Procline is always in the format of:
# RESQUE_PROCLINE_PREFIXresque-VERSION: STRING
def procline(string)
$0 = "#{ENV['RESQUE_PROCLINE_PREFIX']}resque-#{Resque::Version}: #{string}"
$0 = "#{ENV['RESQUE_PROCLINE_PREFIX']}resque-#{Resque::VERSION}: #{string}"
log_with_severity :debug, $0
end

Expand Down
4 changes: 2 additions & 2 deletions test/worker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def self.perform
it "supports setting the procline to have arbitrary prefixes and suffixes" do
prefix = 'WORKER-TEST-PREFIX/'
suffix = 'worker-test-suffix'
ver = Resque::Version
ver = Resque::VERSION

old_prefix = ENV['RESQUE_PROCLINE_PREFIX']
ENV.delete('RESQUE_PROCLINE_PREFIX')
Expand Down Expand Up @@ -578,7 +578,7 @@ def self.perform
without_forking do
@worker.extend(AssertInWorkBlock).work(0) do
prefix = ENV['RESQUE_PROCLINE_PREFIX']
ver = Resque::Version
ver = Resque::VERSION
assert_equal "#{prefix}resque-#{ver}: Processing jobs since #{Time.now.to_i} [SomeJob]", $0
end
end
Expand Down

0 comments on commit 085f77e

Please sign in to comment.