lib/sidekiq_unique_jobs/scripts.rb in sidekiq-unique-jobs-4.0.13 vs lib/sidekiq_unique_jobs/scripts.rb in sidekiq-unique-jobs-4.0.15
- old
+ new
@@ -5,11 +5,11 @@
ScriptError = Class.new(StandardError)
module Scripts
LUA_PATHNAME ||= Pathname.new(__FILE__).dirname.join('../../redis').freeze
SOURCE_FILES ||= Dir[LUA_PATHNAME.join('**/*.lua')].compact.freeze
- DEFINED_METHODS ||= []
+ DEFINED_METHODS ||= [].freeze
module_function
extend SingleForwardable
def_delegator :SidekiqUniqueJobs, :connection
@@ -28,12 +28,12 @@
redis.evalsha(script_shas[file_name], options)
end
rescue Redis::CommandError => ex
raise ScriptError,
"#{file_name}.lua\n\n" +
- ex.message + "\n\n" +
- script_source(file_name) +
- ex.backtrace.join("\n")
+ ex.message + "\n\n" +
+ script_source(file_name) +
+ ex.backtrace.join("\n")
end
def script_source(file_name)
script_path(file_name).read
end