Skip to content

Commit

Permalink
Merge branch 'master' into document-code
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenrixon authored Jul 21, 2018
2 parents 19dbfc1 + 22cfbc8 commit f00a413
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions lib/sidekiq_unique_jobs/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ module SidekiqUniqueJobs
# Error raised when a Lua script fails to execute
#
# @author Mikael Henriksson <mikael@zoolutions.se>
class ScriptError < StandardError
# @param [Symbol] file_name the name of the lua script
# @param [Redis::CommandError] source_exception the wrapped exception
def initialize(file_name:, source_exception:)
super("Problem compiling #{file_name}. Message: #{source_exception.message}")
class Conflict < StandardError
def initialize(item)
super("Item with the key: #{item[UNIQUE_DIGEST_KEY]} is already scheduled or processing")
end
end

Expand Down
2 changes: 1 addition & 1 deletion rails_example/app/workers/simple_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class SimpleWorker
include Sidekiq::Worker
sidekiq_options unique: :until_executed,
sidekiq_options lock: :until_executed,
queue: :default,
unique_args: (lambda do |args|
[args.first]
Expand Down
2 changes: 1 addition & 1 deletion rails_example/app/workers/slow_until_executing_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class SlowUntilExecutingWorker
include Sidekiq::Worker
sidekiq_options unique: :until_executing,
sidekiq_options lock: :until_executing,
queue: :default,
unique_args: (lambda do |args|
[args.first]
Expand Down

0 comments on commit f00a413

Please sign in to comment.