lib/resque/plugins/retry.rb in resque-retry-1.0.0 vs lib/resque/plugins/retry.rb in resque-retry-1.1.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'digest/sha1'
+
module Resque
module Plugins
# If you want your job to retry on failure, simply extend your module/class
# with this module:
@@ -53,10 +55,10 @@
# @return [String] job identifier
#
# @api public
def retry_identifier(*args)
args_string = args.join('-')
- args_string.empty? ? nil : args_string
+ args_string.empty? ? nil : Digest::SHA1.hexdigest(args_string)
end
# Builds the redis key to be used for keeping state of the job
# attempts.
#