Skip to content

Commit

Permalink
use Resque.encode instead of to_s for stringifying arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
challengee committed Mar 7, 2013
1 parent 4fc9ea2 commit bc2c756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/plugins/lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def lock_timeout
# passed the same arguments as `perform`, that is, your job's
# payload.
def lock(*args)
"lock:#{name}-#{args.to_s}"
"lock:#{name}-#{Resque.encode(args)}"
end

# See the documentation for SETNX http://redis.io/commands/setnx for an
Expand Down

0 comments on commit bc2c756

Please sign in to comment.