sidekiq-unique-jobs 6.0.6 → 6.0.25
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq-unique-jobs might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +768 -150
- data/README.md +123 -77
- data/bin/uniquejobs +2 -2
- data/lib/sidekiq-unique-jobs.rb +1 -1
- data/lib/sidekiq_unique_jobs/cli.rb +27 -12
- data/lib/sidekiq_unique_jobs/client/middleware.rb +8 -4
- data/lib/sidekiq_unique_jobs/constants.rb +29 -18
- data/lib/sidekiq_unique_jobs/digests.rb +34 -19
- data/lib/sidekiq_unique_jobs/job.rb +29 -0
- data/lib/sidekiq_unique_jobs/lock/base_lock.rb +14 -18
- data/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb +20 -4
- data/lib/sidekiq_unique_jobs/lock/until_executed.rb +7 -3
- data/lib/sidekiq_unique_jobs/lock/until_executing.rb +1 -1
- data/lib/sidekiq_unique_jobs/lock/until_expired.rb +1 -0
- data/lib/sidekiq_unique_jobs/lock/while_executing.rb +9 -3
- data/lib/sidekiq_unique_jobs/lock/while_executing_reject.rb +0 -8
- data/lib/sidekiq_unique_jobs/locksmith.rb +59 -32
- data/lib/sidekiq_unique_jobs/logging.rb +14 -0
- data/lib/sidekiq_unique_jobs/middleware.rb +26 -9
- data/lib/sidekiq_unique_jobs/normalizer.rb +1 -1
- data/lib/sidekiq_unique_jobs/on_conflict/raise.rb +1 -1
- data/lib/sidekiq_unique_jobs/on_conflict/reject.rb +3 -3
- data/lib/sidekiq_unique_jobs/on_conflict/replace.rb +7 -2
- data/lib/sidekiq_unique_jobs/on_conflict/strategy.rb +1 -1
- data/lib/sidekiq_unique_jobs/on_conflict.rb +12 -7
- data/lib/sidekiq_unique_jobs/options_with_fallback.rb +8 -8
- data/lib/sidekiq_unique_jobs/scripts.rb +38 -9
- data/lib/sidekiq_unique_jobs/server/middleware.rb +18 -6
- data/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb +1 -1
- data/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb +88 -0
- data/lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb +13 -4
- data/lib/sidekiq_unique_jobs/testing.rb +3 -3
- data/lib/sidekiq_unique_jobs/timeout/calculator.rb +2 -1
- data/lib/sidekiq_unique_jobs/timeout.rb +1 -1
- data/lib/sidekiq_unique_jobs/unique_args.rb +7 -4
- data/lib/sidekiq_unique_jobs/util.rb +8 -4
- data/lib/sidekiq_unique_jobs/version.rb +1 -1
- data/lib/sidekiq_unique_jobs/version_check.rb +95 -0
- data/lib/sidekiq_unique_jobs/web/helpers.rb +7 -6
- data/lib/sidekiq_unique_jobs/web/views/unique_digests.erb +4 -0
- data/lib/sidekiq_unique_jobs/web.rb +19 -12
- data/lib/sidekiq_unique_jobs.rb +33 -107
- data/lib/tasks/changelog.rake +23 -0
- data/redis/convert_legacy_lock.lua +13 -0
- data/redis/delete_by_digest.lua +10 -11
- data/redis/delete_job_by_digest.lua +6 -4
- data/redis/lock.lua +14 -10
- data/redis/unlock.lua +13 -11
- metadata +88 -108
- data/.codeclimate.yml +0 -35
- data/.csslintrc +0 -2
- data/.dockerignore +0 -4
- data/.editorconfig +0 -14
- data/.eslintignore +0 -1
- data/.eslintrc +0 -213
- data/.fasterer.yml +0 -23
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
- data/.gitignore +0 -26
- data/.reek.yml +0 -87
- data/.rspec +0 -2
- data/.rubocop.yml +0 -127
- data/.simplecov +0 -20
- data/.travis.yml +0 -49
- data/.yardopts +0 -7
- data/Appraisals +0 -25
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -24
- data/Guardfile +0 -55
- data/Rakefile +0 -12
- data/_config.yml +0 -1
- data/assets/unique_digests_1.png +0 -0
- data/assets/unique_digests_2.png +0 -0
- data/bin/bench +0 -20
- data/examples/another_unique_job.rb +0 -15
- data/examples/custom_queue_job.rb +0 -12
- data/examples/custom_queue_job_with_filter_method.rb +0 -13
- data/examples/custom_queue_job_with_filter_proc.rb +0 -16
- data/examples/expiring_job.rb +0 -12
- data/examples/inline_worker.rb +0 -12
- data/examples/just_a_worker.rb +0 -13
- data/examples/long_running_job.rb +0 -14
- data/examples/main_job.rb +0 -14
- data/examples/my_job.rb +0 -12
- data/examples/my_unique_job.rb +0 -15
- data/examples/my_unique_job_with_filter_method.rb +0 -21
- data/examples/my_unique_job_with_filter_proc.rb +0 -19
- data/examples/notify_worker.rb +0 -14
- data/examples/plain_class.rb +0 -13
- data/examples/simple_worker.rb +0 -15
- data/examples/spawn_simple_worker.rb +0 -12
- data/examples/test_class.rb +0 -9
- data/examples/unique_across_workers_job.rb +0 -20
- data/examples/unique_job_on_conflict_raise.rb +0 -14
- data/examples/unique_job_on_conflict_reject.rb +0 -14
- data/examples/unique_job_on_conflict_reschedule.rb +0 -14
- data/examples/unique_job_with_conditional_parameter.rb +0 -18
- data/examples/unique_job_with_filter_method.rb +0 -21
- data/examples/unique_job_with_nil_unique_args.rb +0 -20
- data/examples/unique_job_with_no_unique_args_method.rb +0 -16
- data/examples/unique_job_withthout_unique_args_parameter.rb +0 -18
- data/examples/unique_on_all_queues_job.rb +0 -16
- data/examples/until_and_while_executing_job.rb +0 -17
- data/examples/until_executed_2_job.rb +0 -24
- data/examples/until_executed_job.rb +0 -25
- data/examples/until_executing_job.rb +0 -11
- data/examples/until_expired_job.rb +0 -12
- data/examples/until_global_expired_job.rb +0 -12
- data/examples/while_executing_job.rb +0 -15
- data/examples/while_executing_reject_job.rb +0 -14
- data/examples/without_argument_job.rb +0 -13
- data/sidekiq-unique-jobs.gemspec +0 -42
data/lib/sidekiq_unique_jobs.rb
CHANGED
@@ -1,109 +1,35 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
|
6
|
-
require
|
7
|
-
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
15
|
-
require
|
16
|
-
require
|
17
|
-
require
|
18
|
-
require
|
19
|
-
require
|
20
|
-
require
|
21
|
-
require
|
22
|
-
require
|
23
|
-
require
|
24
|
-
require
|
25
|
-
require
|
26
|
-
require
|
27
|
-
require
|
28
|
-
require
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
33
|
-
require
|
34
|
-
|
35
|
-
|
36
|
-
#
|
37
|
-
# Contains configuration and utility methods that belongs top level
|
38
|
-
#
|
39
|
-
# @author Mikael Henriksson <mikael@zoolutions.se>
|
40
|
-
module SidekiqUniqueJobs
|
41
|
-
include SidekiqUniqueJobs::Connection
|
42
|
-
|
43
|
-
module_function
|
44
|
-
|
45
|
-
Concurrent::MutableStruct.new(
|
46
|
-
'Config',
|
47
|
-
:default_lock_timeout,
|
48
|
-
:enabled,
|
49
|
-
:unique_prefix,
|
50
|
-
:logger,
|
51
|
-
)
|
52
|
-
|
53
|
-
# The current configuration (See: {.configure} on how to configure)
|
54
|
-
def config
|
55
|
-
# Arguments here need to match the definition of the new class (see above)
|
56
|
-
@config ||= Concurrent::MutableStruct::Config.new(
|
57
|
-
0,
|
58
|
-
true,
|
59
|
-
'uniquejobs',
|
60
|
-
Sidekiq.logger,
|
61
|
-
)
|
62
|
-
end
|
63
|
-
|
64
|
-
# The current logger
|
65
|
-
# @return [Logger] the configured logger
|
66
|
-
def logger
|
67
|
-
config.logger
|
68
|
-
end
|
69
|
-
|
70
|
-
# Set a new logger
|
71
|
-
# @param [Logger] other a new logger
|
72
|
-
def logger=(other)
|
73
|
-
config.logger = other
|
74
|
-
end
|
75
|
-
|
76
|
-
# Change global configuration while yielding
|
77
|
-
# @yield control to the caller
|
78
|
-
def use_config(tmp_config)
|
79
|
-
fail ::ArgumentError, "#{name}.#{__method__} needs a block" unless block_given?
|
80
|
-
|
81
|
-
old_config = config.to_h
|
82
|
-
configure(tmp_config)
|
83
|
-
yield
|
84
|
-
configure(old_config)
|
85
|
-
end
|
86
|
-
|
87
|
-
# Configure the gem
|
88
|
-
#
|
89
|
-
# This is usually called once at startup of an application
|
90
|
-
# @param [Hash] options global gem options
|
91
|
-
# @option options [Integer] :default_lock_timeout (default is 0)
|
92
|
-
# @option options [true,false] :enabled (default is true)
|
93
|
-
# @option options [String] :unique_prefix (default is 'uniquejobs')
|
94
|
-
# @option options [Logger] :logger (default is Sidekiq.logger)
|
95
|
-
# @yield control to the caller when given block
|
96
|
-
def configure(options = {})
|
97
|
-
if block_given?
|
98
|
-
yield config
|
99
|
-
else
|
100
|
-
options.each do |key, val|
|
101
|
-
config.send("#{key}=", val)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
def redis_version
|
107
|
-
@redis_version ||= redis { |conn| conn.info('server')['redis_version'] }
|
108
|
-
end
|
109
|
-
end
|
3
|
+
require "forwardable"
|
4
|
+
require "concurrent/mutable_struct"
|
5
|
+
|
6
|
+
require "sidekiq_unique_jobs/version"
|
7
|
+
require "sidekiq_unique_jobs/version_check"
|
8
|
+
require "sidekiq_unique_jobs/constants"
|
9
|
+
require "sidekiq_unique_jobs/logging"
|
10
|
+
require "sidekiq_unique_jobs/sidekiq_worker_methods"
|
11
|
+
require "sidekiq_unique_jobs/connection"
|
12
|
+
require "sidekiq_unique_jobs/exceptions"
|
13
|
+
require "sidekiq_unique_jobs/job"
|
14
|
+
require "sidekiq_unique_jobs/util"
|
15
|
+
require "sidekiq_unique_jobs/digests"
|
16
|
+
require "sidekiq_unique_jobs/cli"
|
17
|
+
require "sidekiq_unique_jobs/core_ext"
|
18
|
+
require "sidekiq_unique_jobs/timeout"
|
19
|
+
require "sidekiq_unique_jobs/scripts"
|
20
|
+
require "sidekiq_unique_jobs/unique_args"
|
21
|
+
require "sidekiq_unique_jobs/unlockable"
|
22
|
+
require "sidekiq_unique_jobs/locksmith"
|
23
|
+
require "sidekiq_unique_jobs/lock/base_lock"
|
24
|
+
require "sidekiq_unique_jobs/lock/until_executed"
|
25
|
+
require "sidekiq_unique_jobs/lock/until_executing"
|
26
|
+
require "sidekiq_unique_jobs/lock/until_expired"
|
27
|
+
require "sidekiq_unique_jobs/lock/while_executing"
|
28
|
+
require "sidekiq_unique_jobs/lock/while_executing_reject"
|
29
|
+
require "sidekiq_unique_jobs/lock/until_and_while_executing"
|
30
|
+
require "sidekiq_unique_jobs/options_with_fallback"
|
31
|
+
require "sidekiq_unique_jobs/middleware"
|
32
|
+
require "sidekiq_unique_jobs/sidekiq_unique_ext"
|
33
|
+
require "sidekiq_unique_jobs/on_conflict"
|
34
|
+
|
35
|
+
require "sidekiq_unique_jobs/sidekiq_unique_jobs"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
desc "Generate a Changelog"
|
4
|
+
task :changelog do
|
5
|
+
# rubocop:disable Style/MutableConstant
|
6
|
+
CHANGELOG_CMD ||= %w[
|
7
|
+
github_changelog_generator
|
8
|
+
-u
|
9
|
+
mhenrixon
|
10
|
+
-p
|
11
|
+
sidekiq-unique-jobs
|
12
|
+
--no-verbose
|
13
|
+
--token
|
14
|
+
]
|
15
|
+
ADD_CHANGELOG_CMD ||= "git add --all"
|
16
|
+
COMMIT_CHANGELOG_CMD ||= "git commit -a -m 'Update changelog'"
|
17
|
+
# rubocop:enable Style/MutableConstant
|
18
|
+
|
19
|
+
sh("git checkout master")
|
20
|
+
sh(*CHANGELOG_CMD.push(ENV["CHANGELOG_GITHUB_TOKEN"]))
|
21
|
+
sh(ADD_CHANGELOG_CMD)
|
22
|
+
sh(COMMIT_CHANGELOG_CMD)
|
23
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
local grabbed_key = KEYS[1]
|
2
|
+
local unique_digest = KEYS[2]
|
3
|
+
|
4
|
+
local job_id = ARGV[1]
|
5
|
+
local current_time = tonumber(ARGV[2])
|
6
|
+
|
7
|
+
local old_token = redis.call('GET', unique_digest)
|
8
|
+
if old_token then
|
9
|
+
if old_token == job_id or old_token == '2' then
|
10
|
+
redis.call('DEL', unique_digest)
|
11
|
+
redis.call('HSET', grabbed_key, job_id, current_time)
|
12
|
+
end
|
13
|
+
end
|
data/redis/delete_by_digest.lua
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
-- redis.replicate_commands();
|
2
|
-
local unique_keys
|
3
|
-
local unique_digest
|
4
|
-
|
5
|
-
local
|
6
|
-
local
|
7
|
-
local
|
8
|
-
local
|
9
|
-
local
|
10
|
-
local
|
11
|
-
local
|
12
|
-
local run_version_key = unique_digest .. ':RUN:VERSION'
|
2
|
+
local unique_keys = KEYS[1]
|
3
|
+
local unique_digest = KEYS[2]
|
4
|
+
local exists_key = KEYS[3]
|
5
|
+
local grabbed_key = KEYS[4]
|
6
|
+
local available_key = KEYS[5]
|
7
|
+
local version_key = KEYS[6]
|
8
|
+
local run_exists_key = KEYS[7]
|
9
|
+
local run_grabbed_key = KEYS[8]
|
10
|
+
local run_available_key = KEYS[9]
|
11
|
+
local run_version_key = KEYS[10]
|
13
12
|
|
14
13
|
local count = redis.call('SREM', unique_keys, unique_digest)
|
15
14
|
redis.call('DEL', exists_key)
|
@@ -1,5 +1,7 @@
|
|
1
|
-
local queue =
|
2
|
-
local
|
1
|
+
local queue = KEYS[1]
|
2
|
+
local schedule_set = KEYS[2]
|
3
|
+
local retry_set = KEYS[3]
|
4
|
+
local unique_digest = ARGV[1]
|
3
5
|
|
4
6
|
local function delete_from_sorted_set(name, digest)
|
5
7
|
local per = 50
|
@@ -49,10 +51,10 @@ if result then
|
|
49
51
|
return result
|
50
52
|
end
|
51
53
|
|
52
|
-
result = delete_from_sorted_set(
|
54
|
+
result = delete_from_sorted_set(schedule_set, unique_digest)
|
53
55
|
if result then
|
54
56
|
return result
|
55
57
|
end
|
56
58
|
|
57
|
-
result = delete_from_sorted_set(
|
59
|
+
result = delete_from_sorted_set(retry_set, unique_digest)
|
58
60
|
return result
|
data/redis/lock.lua
CHANGED
@@ -6,8 +6,9 @@ local available_key = KEYS[3]
|
|
6
6
|
local unique_keys = KEYS[4]
|
7
7
|
local unique_digest = KEYS[5]
|
8
8
|
|
9
|
-
local job_id
|
10
|
-
local
|
9
|
+
local job_id = ARGV[1]
|
10
|
+
local ttl = tonumber(ARGV[2])
|
11
|
+
local lock = ARGV[3]
|
11
12
|
|
12
13
|
local function current_time()
|
13
14
|
local time = redis.call('time')
|
@@ -18,11 +19,8 @@ local function current_time()
|
|
18
19
|
return number
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
local stored_token = redis.call('GET', exists_key)
|
22
|
+
local stored_token = redis.call('GET', exists_key)
|
24
23
|
if stored_token and stored_token ~= job_id then
|
25
|
-
-- redis.log(redis.LOG_DEBUG, "create.lua - jid: " .. job_id .. " - returning existing jid: " .. stored_token)
|
26
24
|
return stored_token
|
27
25
|
end
|
28
26
|
|
@@ -49,10 +47,16 @@ redis.call('DEL', grabbed_key)
|
|
49
47
|
redis.call('DEL', available_key)
|
50
48
|
redis.call('RPUSH', available_key, job_id)
|
51
49
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
-- The client should only set ttl for until_expired
|
51
|
+
-- The server should set ttl for all other jobs
|
52
|
+
-- redis.log(redis.LOG_WARNING, "lock: " .. lock .. ", ttl: " .. tostring(ttl))
|
53
|
+
if lock == "until_expired" and ttl and ttl > 0 then
|
54
|
+
-- We can't keep the key here because it will otherwise never be deleted
|
55
|
+
redis.call('SREM', unique_keys, unique_digest)
|
56
|
+
|
57
|
+
redis.call('EXPIRE', available_key, ttl)
|
58
|
+
redis.call('EXPIRE', exists_key, ttl)
|
59
|
+
redis.call('EXPIRE', unique_digest, ttl)
|
56
60
|
end
|
57
61
|
|
58
62
|
return job_id
|
data/redis/unlock.lua
CHANGED
@@ -5,20 +5,19 @@ local version_key = KEYS[4]
|
|
5
5
|
local unique_keys = KEYS[5]
|
6
6
|
local unique_digest = KEYS[6] -- TODO: Legacy support (Remove in v6.1)
|
7
7
|
|
8
|
-
local token
|
9
|
-
local
|
8
|
+
local token = ARGV[1]
|
9
|
+
local ttl = tonumber(ARGV[2])
|
10
|
+
local lock = ARGV[3]
|
10
11
|
|
11
|
-
redis.call('HDEL', grabbed_key, token)
|
12
12
|
redis.call('SREM', unique_keys, unique_digest)
|
13
|
-
local available_count = redis.call('LPUSH', available_key, token)
|
14
13
|
|
15
|
-
if
|
16
|
-
redis.log(redis.LOG_DEBUG, "signal_locks.lua - expiring stale locks")
|
14
|
+
if ttl then
|
17
15
|
redis.call('SREM', unique_keys, unique_digest)
|
18
|
-
redis.call('EXPIRE', exists_key,
|
19
|
-
redis.call('EXPIRE',
|
20
|
-
redis.call('EXPIRE',
|
21
|
-
redis.call('EXPIRE',
|
16
|
+
redis.call('EXPIRE', exists_key, ttl)
|
17
|
+
redis.call('EXPIRE', grabbed_key, ttl)
|
18
|
+
redis.call('EXPIRE', available_key, ttl)
|
19
|
+
redis.call('EXPIRE', version_key, ttl) -- TODO: Legacy support (Remove in v6.1)
|
20
|
+
redis.call('EXPIRE', unique_digest, ttl) -- TODO: Legacy support (Remove in v6.1)
|
22
21
|
else
|
23
22
|
redis.call('DEL', exists_key)
|
24
23
|
redis.call('SREM', unique_keys, unique_digest)
|
@@ -29,5 +28,8 @@ else
|
|
29
28
|
redis.call('DEL', unique_digest) -- TODO: Legacy support (Remove in v6.1)
|
30
29
|
end
|
31
30
|
|
32
|
-
|
31
|
+
redis.call('HDEL', grabbed_key, token)
|
32
|
+
local count = redis.call('LPUSH', available_key, token)
|
33
|
+
redis.call('EXPIRE', available_key, 5)
|
34
|
+
return count
|
33
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-unique-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '4.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '7.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,49 +49,61 @@ dependencies:
|
|
49
49
|
version: '4.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '7.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: thor
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0.20'
|
60
|
+
- - "<"
|
58
61
|
- !ruby/object:Gem::Version
|
59
|
-
version: '0'
|
62
|
+
version: '2.0'
|
60
63
|
type: :runtime
|
61
64
|
prerelease: false
|
62
65
|
version_requirements: !ruby/object:Gem::Requirement
|
63
66
|
requirements:
|
64
|
-
- - "
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.20'
|
70
|
+
- - "<"
|
65
71
|
- !ruby/object:Gem::Version
|
66
|
-
version: '0'
|
72
|
+
version: '2.0'
|
67
73
|
- !ruby/object:Gem::Dependency
|
68
74
|
name: bundler
|
69
75
|
requirement: !ruby/object:Gem::Requirement
|
70
76
|
requirements:
|
71
77
|
- - "~>"
|
72
78
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
79
|
+
version: '2.0'
|
74
80
|
type: :development
|
75
81
|
prerelease: false
|
76
82
|
version_requirements: !ruby/object:Gem::Requirement
|
77
83
|
requirements:
|
78
84
|
- - "~>"
|
79
85
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
86
|
+
version: '2.0'
|
81
87
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
88
|
+
name: rack-test
|
83
89
|
requirement: !ruby/object:Gem::Requirement
|
84
90
|
requirements:
|
85
|
-
- - "
|
91
|
+
- - ">="
|
86
92
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
93
|
+
version: '1.0'
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.0'
|
88
97
|
type: :development
|
89
98
|
prerelease: false
|
90
99
|
version_requirements: !ruby/object:Gem::Requirement
|
91
100
|
requirements:
|
92
|
-
- - "
|
101
|
+
- - ">="
|
93
102
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
103
|
+
version: '1.0'
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '2.0'
|
95
107
|
- !ruby/object:Gem::Dependency
|
96
108
|
name: rake
|
97
109
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,21 +119,41 @@ dependencies:
|
|
107
119
|
- !ruby/object:Gem::Version
|
108
120
|
version: '12.3'
|
109
121
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
122
|
+
name: rspec
|
111
123
|
requirement: !ruby/object:Gem::Requirement
|
112
124
|
requirements:
|
113
125
|
- - "~>"
|
114
126
|
- !ruby/object:Gem::Version
|
115
|
-
version: '
|
127
|
+
version: '3.7'
|
116
128
|
type: :development
|
117
129
|
prerelease: false
|
118
130
|
version_requirements: !ruby/object:Gem::Requirement
|
119
131
|
requirements:
|
120
132
|
- - "~>"
|
121
133
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
134
|
+
version: '3.7'
|
123
135
|
- !ruby/object:Gem::Dependency
|
124
|
-
name:
|
136
|
+
name: sinatra
|
137
|
+
requirement: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '2.0'
|
142
|
+
- - "<"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '3.0'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '2.0'
|
152
|
+
- - "<"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '3.0'
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: timecop
|
125
157
|
requirement: !ruby/object:Gem::Requirement
|
126
158
|
requirements:
|
127
159
|
- - "~>"
|
@@ -135,135 +167,75 @@ dependencies:
|
|
135
167
|
- !ruby/object:Gem::Version
|
136
168
|
version: '0.9'
|
137
169
|
- !ruby/object:Gem::Dependency
|
138
|
-
name:
|
170
|
+
name: github-markup
|
139
171
|
requirement: !ruby/object:Gem::Requirement
|
140
172
|
requirements:
|
141
173
|
- - "~>"
|
142
174
|
- !ruby/object:Gem::Version
|
143
|
-
version: '
|
175
|
+
version: '3.0'
|
144
176
|
type: :development
|
145
177
|
prerelease: false
|
146
178
|
version_requirements: !ruby/object:Gem::Requirement
|
147
179
|
requirements:
|
148
180
|
- - "~>"
|
149
181
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
182
|
+
version: '3.0'
|
151
183
|
- !ruby/object:Gem::Dependency
|
152
|
-
name:
|
184
|
+
name: github_changelog_generator
|
153
185
|
requirement: !ruby/object:Gem::Requirement
|
154
186
|
requirements:
|
155
187
|
- - "~>"
|
156
188
|
- !ruby/object:Gem::Version
|
157
|
-
version: '1.
|
189
|
+
version: '1.14'
|
158
190
|
type: :development
|
159
191
|
prerelease: false
|
160
192
|
version_requirements: !ruby/object:Gem::Requirement
|
161
193
|
requirements:
|
162
194
|
- - "~>"
|
163
195
|
- !ruby/object:Gem::Version
|
164
|
-
version: '1.
|
196
|
+
version: '1.14'
|
165
197
|
- !ruby/object:Gem::Dependency
|
166
|
-
name:
|
198
|
+
name: yard
|
167
199
|
requirement: !ruby/object:Gem::Requirement
|
168
200
|
requirements:
|
169
|
-
- - "
|
201
|
+
- - "~>"
|
170
202
|
- !ruby/object:Gem::Version
|
171
|
-
version:
|
203
|
+
version: 0.9.18
|
172
204
|
type: :development
|
173
205
|
prerelease: false
|
174
206
|
version_requirements: !ruby/object:Gem::Requirement
|
175
207
|
requirements:
|
176
|
-
- - "
|
208
|
+
- - "~>"
|
177
209
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
210
|
+
version: 0.9.18
|
179
211
|
- !ruby/object:Gem::Dependency
|
180
|
-
name:
|
212
|
+
name: gem-release
|
181
213
|
requirement: !ruby/object:Gem::Requirement
|
182
214
|
requirements:
|
183
|
-
- - "
|
215
|
+
- - "~>"
|
184
216
|
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
217
|
+
version: '2.0'
|
186
218
|
type: :development
|
187
219
|
prerelease: false
|
188
220
|
version_requirements: !ruby/object:Gem::Requirement
|
189
221
|
requirements:
|
190
|
-
- - "
|
222
|
+
- - "~>"
|
191
223
|
- !ruby/object:Gem::Version
|
192
|
-
version: '0'
|
193
|
-
description:
|
224
|
+
version: '2.0'
|
225
|
+
description: |
|
226
|
+
Prevents simultaneous Sidekiq jobs with the same unique arguments to run.
|
227
|
+
Highly configurable to suite your specific needs.
|
194
228
|
email:
|
195
|
-
- mikael@
|
229
|
+
- mikael@mhenrixon.com
|
196
230
|
executables:
|
197
231
|
- uniquejobs
|
198
232
|
extensions: []
|
199
233
|
extra_rdoc_files: []
|
200
234
|
files:
|
201
|
-
- ".codeclimate.yml"
|
202
|
-
- ".csslintrc"
|
203
|
-
- ".dockerignore"
|
204
|
-
- ".editorconfig"
|
205
|
-
- ".eslintignore"
|
206
|
-
- ".eslintrc"
|
207
|
-
- ".fasterer.yml"
|
208
|
-
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
209
|
-
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
210
|
-
- ".gitignore"
|
211
|
-
- ".reek.yml"
|
212
|
-
- ".rspec"
|
213
|
-
- ".rubocop.yml"
|
214
|
-
- ".simplecov"
|
215
|
-
- ".travis.yml"
|
216
|
-
- ".yardopts"
|
217
|
-
- Appraisals
|
218
235
|
- CHANGELOG.md
|
219
|
-
- CODE_OF_CONDUCT.md
|
220
|
-
- Gemfile
|
221
|
-
- Guardfile
|
222
236
|
- LICENSE.txt
|
223
237
|
- README.md
|
224
|
-
- Rakefile
|
225
|
-
- _config.yml
|
226
|
-
- assets/unique_digests_1.png
|
227
|
-
- assets/unique_digests_2.png
|
228
|
-
- bin/bench
|
229
238
|
- bin/uniquejobs
|
230
|
-
- examples/another_unique_job.rb
|
231
|
-
- examples/custom_queue_job.rb
|
232
|
-
- examples/custom_queue_job_with_filter_method.rb
|
233
|
-
- examples/custom_queue_job_with_filter_proc.rb
|
234
|
-
- examples/expiring_job.rb
|
235
|
-
- examples/inline_worker.rb
|
236
|
-
- examples/just_a_worker.rb
|
237
|
-
- examples/long_running_job.rb
|
238
|
-
- examples/main_job.rb
|
239
|
-
- examples/my_job.rb
|
240
|
-
- examples/my_unique_job.rb
|
241
|
-
- examples/my_unique_job_with_filter_method.rb
|
242
|
-
- examples/my_unique_job_with_filter_proc.rb
|
243
|
-
- examples/notify_worker.rb
|
244
|
-
- examples/plain_class.rb
|
245
|
-
- examples/simple_worker.rb
|
246
|
-
- examples/spawn_simple_worker.rb
|
247
|
-
- examples/test_class.rb
|
248
|
-
- examples/unique_across_workers_job.rb
|
249
|
-
- examples/unique_job_on_conflict_raise.rb
|
250
|
-
- examples/unique_job_on_conflict_reject.rb
|
251
|
-
- examples/unique_job_on_conflict_reschedule.rb
|
252
|
-
- examples/unique_job_with_conditional_parameter.rb
|
253
|
-
- examples/unique_job_with_filter_method.rb
|
254
|
-
- examples/unique_job_with_nil_unique_args.rb
|
255
|
-
- examples/unique_job_with_no_unique_args_method.rb
|
256
|
-
- examples/unique_job_withthout_unique_args_parameter.rb
|
257
|
-
- examples/unique_on_all_queues_job.rb
|
258
|
-
- examples/until_and_while_executing_job.rb
|
259
|
-
- examples/until_executed_2_job.rb
|
260
|
-
- examples/until_executed_job.rb
|
261
|
-
- examples/until_executing_job.rb
|
262
|
-
- examples/until_expired_job.rb
|
263
|
-
- examples/until_global_expired_job.rb
|
264
|
-
- examples/while_executing_job.rb
|
265
|
-
- examples/while_executing_reject_job.rb
|
266
|
-
- examples/without_argument_job.rb
|
267
239
|
- lib/sidekiq-unique-jobs.rb
|
268
240
|
- lib/sidekiq_unique_jobs.rb
|
269
241
|
- lib/sidekiq_unique_jobs/cli.rb
|
@@ -273,6 +245,7 @@ files:
|
|
273
245
|
- lib/sidekiq_unique_jobs/core_ext.rb
|
274
246
|
- lib/sidekiq_unique_jobs/digests.rb
|
275
247
|
- lib/sidekiq_unique_jobs/exceptions.rb
|
248
|
+
- lib/sidekiq_unique_jobs/job.rb
|
276
249
|
- lib/sidekiq_unique_jobs/lock/base_lock.rb
|
277
250
|
- lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb
|
278
251
|
- lib/sidekiq_unique_jobs/lock/until_executed.rb
|
@@ -296,6 +269,7 @@ files:
|
|
296
269
|
- lib/sidekiq_unique_jobs/scripts.rb
|
297
270
|
- lib/sidekiq_unique_jobs/server/middleware.rb
|
298
271
|
- lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb
|
272
|
+
- lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb
|
299
273
|
- lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb
|
300
274
|
- lib/sidekiq_unique_jobs/testing.rb
|
301
275
|
- lib/sidekiq_unique_jobs/timeout.rb
|
@@ -304,24 +278,31 @@ files:
|
|
304
278
|
- lib/sidekiq_unique_jobs/unlockable.rb
|
305
279
|
- lib/sidekiq_unique_jobs/util.rb
|
306
280
|
- lib/sidekiq_unique_jobs/version.rb
|
281
|
+
- lib/sidekiq_unique_jobs/version_check.rb
|
307
282
|
- lib/sidekiq_unique_jobs/web.rb
|
308
283
|
- lib/sidekiq_unique_jobs/web/helpers.rb
|
309
284
|
- lib/sidekiq_unique_jobs/web/views/_paging.erb
|
310
285
|
- lib/sidekiq_unique_jobs/web/views/unique_digest.erb
|
311
286
|
- lib/sidekiq_unique_jobs/web/views/unique_digests.erb
|
287
|
+
- lib/tasks/changelog.rake
|
312
288
|
- redis/acquire_lock.lua
|
289
|
+
- redis/convert_legacy_lock.lua
|
313
290
|
- redis/delete.lua
|
314
291
|
- redis/delete_by_digest.lua
|
315
292
|
- redis/delete_job_by_digest.lua
|
316
293
|
- redis/lock.lua
|
317
294
|
- redis/release_stale_locks.lua
|
318
295
|
- redis/unlock.lua
|
319
|
-
|
320
|
-
homepage: https://github.com/mhenrixon/sidekiq-unique-jobs
|
296
|
+
homepage: https://mhenrixon.github.io/sidekiq-unique-jobs
|
321
297
|
licenses:
|
322
298
|
- MIT
|
323
|
-
metadata:
|
324
|
-
|
299
|
+
metadata:
|
300
|
+
homepage_uri: https://mhenrixon.github.io/sidekiq-unique-jobs
|
301
|
+
bug_tracker_uri: https://github.com/mhenrixon/sidekiq-unique-jobs/issues
|
302
|
+
documentation_uri: https://mhenrixon.github.io/sidekiq-unique-jobs
|
303
|
+
source_code_uri: https://github.com/mhenrixon/sidekiq-unique-jobs
|
304
|
+
changelog_uri: https://github.com/mhenrixon/sidekiq-unique-jobs/CHANGELOG.md
|
305
|
+
post_install_message:
|
325
306
|
rdoc_options: []
|
326
307
|
require_paths:
|
327
308
|
- lib
|
@@ -336,9 +317,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
317
|
- !ruby/object:Gem::Version
|
337
318
|
version: '0'
|
338
319
|
requirements: []
|
339
|
-
|
340
|
-
|
341
|
-
signing_key:
|
320
|
+
rubygems_version: 3.1.2
|
321
|
+
signing_key:
|
342
322
|
specification_version: 4
|
343
|
-
summary:
|
323
|
+
summary: Sidekiq middleware that prevents duplicates jobs
|
344
324
|
test_files: []
|