sidekiq-unique-jobs 8.0.1 → 8.0.2
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 +14 -0
- data/lib/sidekiq_unique_jobs/lock.rb +5 -2
- data/lib/sidekiq_unique_jobs/lua/delete.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/delete_by_digest.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/delete_job_by_digest.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/find_digest_in_queues.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/lock.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/lock_until_expired.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/locked.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/queue.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/reap_orphans.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/shared/_common.lua +0 -5
- data/lib/sidekiq_unique_jobs/lua/unlock.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/update_version.lua +1 -1
- data/lib/sidekiq_unique_jobs/lua/upgrade.lua +1 -1
- data/lib/sidekiq_unique_jobs/version.rb +1 -1
- data/lib/sidekiq_unique_jobs/web/helpers.rb +2 -0
- data/lib/sidekiq_unique_jobs/web/views/changelogs.erb +1 -1
- data/lib/sidekiq_unique_jobs/web/views/lock.erb +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820d13b5365e9a4af437b1fecaebec61f4c07656b6aa77e49fff21186abc9088
|
4
|
+
data.tar.gz: 0b90028e6697ec459ff63094e063100878080ad4a18101a60b7682a554c9b5f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1e24f2c8921566adc9339841d0ef4931f2768bf7acb207eb680cc84b11bb3671749325996c563e6a5aeb699cda33553597c6dec3451a5028c2bb83e292b82f5
|
7
|
+
data.tar.gz: ff870dba5ef353df17aa80ad82c58418daef5a7643d1ff6c9bece90e4d57acacdd1091fd2893e88c0e5459a14668344cfb05d9ef3640d5c25eda1650f87f2f4c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v8.0.1](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v8.0.1) (2023-02-14)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v8.0.0...v8.0.1)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- TypeError: Unsupported command argument type: ActiveSupport::Duration [\#754](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/754)
|
10
|
+
- Incompatibility with Sidekiq 7 [\#736](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/736)
|
11
|
+
|
12
|
+
**Merged pull requests:**
|
13
|
+
|
14
|
+
- Fix active worker detection by using correct keys [\#756](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/756) ([dodo121](https://github.com/dodo121))
|
15
|
+
- Fix minor typo in drift\_reaper\_interval comment [\#755](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/755) ([lazyatom](https://github.com/lazyatom))
|
16
|
+
|
3
17
|
## [v8.0.0](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v8.0.0) (2023-01-30)
|
4
18
|
|
5
19
|
[Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.29...v8.0.0)
|
@@ -46,8 +46,11 @@ module SidekiqUniqueJobs
|
|
46
46
|
# @param [Timstamp, Float] time nil optional timestamp to initiate this lock with
|
47
47
|
#
|
48
48
|
def initialize(key, time: nil)
|
49
|
-
@key
|
50
|
-
|
49
|
+
@key = get_key(key)
|
50
|
+
time = time.is_a?(Float) ? time : time.to_f
|
51
|
+
return unless time.nonzero?
|
52
|
+
|
53
|
+
@created_at = time
|
51
54
|
end
|
52
55
|
|
53
56
|
#
|
@@ -17,7 +17,7 @@ local limit = tonumber(ARGV[4])
|
|
17
17
|
|
18
18
|
-------- BEGIN injected arguments --------
|
19
19
|
local current_time = tonumber(ARGV[5])
|
20
|
-
local debug_lua = tostring(ARGV[6]) == "
|
20
|
+
local debug_lua = tostring(ARGV[6]) == "1"
|
21
21
|
local max_history = tonumber(ARGV[7])
|
22
22
|
local script_name = tostring(ARGV[8]) .. ".lua"
|
23
23
|
local redisversion = tostring(ARGV[9])
|
@@ -12,7 +12,7 @@ local digests = KEYS[9]
|
|
12
12
|
|
13
13
|
-------- BEGIN injected arguments --------
|
14
14
|
local current_time = tonumber(ARGV[1])
|
15
|
-
local debug_lua = ARGV[2] == "
|
15
|
+
local debug_lua = tostring(ARGV[2]) == "1"
|
16
16
|
local max_history = tonumber(ARGV[3])
|
17
17
|
local script_name = tostring(ARGV[4]) .. ".lua"
|
18
18
|
local redisversion = tostring(ARGV[5])
|
@@ -10,7 +10,7 @@ local digest = ARGV[1]
|
|
10
10
|
|
11
11
|
-------- BEGIN injected arguments --------
|
12
12
|
local current_time = tonumber(ARGV[2])
|
13
|
-
local debug_lua = ARGV[3] == "
|
13
|
+
local debug_lua = tostring(ARGV[3]) == "1"
|
14
14
|
local max_history = tonumber(ARGV[4])
|
15
15
|
local script_name = tostring(ARGV[5]) .. ".lua"
|
16
16
|
--------- END injected arguments ---------
|
@@ -4,7 +4,7 @@ local digest = KEYS[1]
|
|
4
4
|
|
5
5
|
-------- BEGIN injected arguments --------
|
6
6
|
local current_time = tonumber(ARGV[2])
|
7
|
-
local debug_lua = ARGV[3] == "
|
7
|
+
local debug_lua = tostring(ARGV[3]) == "1"
|
8
8
|
local max_history = tonumber(ARGV[4])
|
9
9
|
local script_name = tostring(ARGV[5]) .. ".lua"
|
10
10
|
--------- END injected arguments ---------
|
@@ -20,7 +20,7 @@ local limit = tonumber(ARGV[4])
|
|
20
20
|
|
21
21
|
-------- BEGIN injected arguments --------
|
22
22
|
local current_time = tonumber(ARGV[5])
|
23
|
-
local debug_lua = ARGV[6] == "
|
23
|
+
local debug_lua = tostring(ARGV[6]) == "1"
|
24
24
|
local max_history = tonumber(ARGV[7])
|
25
25
|
local script_name = tostring(ARGV[8]) .. ".lua"
|
26
26
|
local redisversion = ARGV[9]
|
@@ -20,7 +20,7 @@ local limit = tonumber(ARGV[4])
|
|
20
20
|
|
21
21
|
-------- BEGIN injected arguments --------
|
22
22
|
local current_time = tonumber(ARGV[5])
|
23
|
-
local debug_lua = ARGV[6] == "
|
23
|
+
local debug_lua = tostring(ARGV[6]) == "1"
|
24
24
|
local max_history = tonumber(ARGV[7])
|
25
25
|
local script_name = tostring(ARGV[8]) .. ".lua"
|
26
26
|
local redisversion = ARGV[9]
|
@@ -14,7 +14,7 @@ local job_id = ARGV[1]
|
|
14
14
|
|
15
15
|
-------- BEGIN injected arguments --------
|
16
16
|
local current_time = tonumber(ARGV[2])
|
17
|
-
local debug_lua = ARGV[3] == "
|
17
|
+
local debug_lua = tostring(ARGV[3]) == "1"
|
18
18
|
local max_history = tonumber(ARGV[4])
|
19
19
|
local script_name = tostring(ARGV[5]) .. ".lua"
|
20
20
|
--------- END injected arguments ---------
|
@@ -19,7 +19,7 @@ local limit = tonumber(ARGV[4])
|
|
19
19
|
|
20
20
|
-------- BEGIN injected arguments --------
|
21
21
|
local current_time = tonumber(ARGV[5])
|
22
|
-
local debug_lua = ARGV[6] == "
|
22
|
+
local debug_lua = tostring(ARGV[6]) == "1"
|
23
23
|
local max_history = tonumber(ARGV[7])
|
24
24
|
local script_name = tostring(ARGV[8]) .. ".lua"
|
25
25
|
--------- END injected arguments ---------
|
@@ -14,7 +14,7 @@ local threshold = tonumber(ARGV[2])
|
|
14
14
|
|
15
15
|
-------- BEGIN injected arguments --------
|
16
16
|
local current_time = tonumber(ARGV[3])
|
17
|
-
local debug_lua = ARGV[4] == "
|
17
|
+
local debug_lua = tostring(ARGV[4]) == "1"
|
18
18
|
local max_history = tonumber(ARGV[5])
|
19
19
|
local script_name = ARGV[6] .. ".lua"
|
20
20
|
local redisversion = ARGV[7]
|
@@ -19,7 +19,7 @@ local limit = tonumber(ARGV[4])
|
|
19
19
|
|
20
20
|
-------- BEGIN injected arguments --------
|
21
21
|
local current_time = tonumber(ARGV[5])
|
22
|
-
local debug_lua = ARGV[6] == "
|
22
|
+
local debug_lua = tostring(ARGV[6]) == "1"
|
23
23
|
local max_history = tonumber(ARGV[7])
|
24
24
|
local script_name = tostring(ARGV[8]) .. ".lua"
|
25
25
|
local redisversion = ARGV[9]
|
@@ -9,7 +9,7 @@ local version = ARGV[1]
|
|
9
9
|
|
10
10
|
-------- BEGIN injected arguments --------
|
11
11
|
local current_time = tonumber(ARGV[2])
|
12
|
-
local debug_lua = ARGV[3] == "
|
12
|
+
local debug_lua = tostring(ARGV[3]) == "1"
|
13
13
|
local max_history = tonumber(ARGV[4])
|
14
14
|
local script_name = tostring(ARGV[5]) .. ".lua"
|
15
15
|
--------- END injected arguments ---------
|
@@ -6,7 +6,7 @@ local dead_version = KEYS[2]
|
|
6
6
|
|
7
7
|
-------- BEGIN injected arguments --------
|
8
8
|
local current_time = tonumber(ARGV[5])
|
9
|
-
local debug_lua = ARGV[6] == "
|
9
|
+
local debug_lua = tostring(ARGV[6]) == "1"
|
10
10
|
local max_history = tonumber(ARGV[7])
|
11
11
|
local script_name = tostring(ARGV[8]) .. ".lua"
|
12
12
|
local redisversion = ARGV[9]
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<tbody>
|
43
43
|
<% @changelogs.each do |changelog| %>
|
44
44
|
<tr class="changelog-row">
|
45
|
-
<td><%= "bogus" %></td>
|
45
|
+
<td><%= safe_relative_time(changelog['time']) || "bogus" %></td>
|
46
46
|
<td><%= changelog["digest"] %></td>
|
47
47
|
<td><%= changelog["script"] %></td>
|
48
48
|
<td><%= changelog["job_id"] %></td>
|
@@ -7,9 +7,11 @@
|
|
7
7
|
<div class="col-sm-7 table-responsive">
|
8
8
|
<% if @lock.info.none? %>
|
9
9
|
<h3>No Lock Information Available</h3>
|
10
|
-
|
11
|
-
<
|
12
|
-
|
10
|
+
<% unless SidekiqUniqueJobs.config.lock_info %>
|
11
|
+
<p>To use it turn the following setting on:
|
12
|
+
<code>SidekiqUniqueJobs.config.lock_info = true</code>
|
13
|
+
</p>
|
14
|
+
<% end %>
|
13
15
|
<% else %>
|
14
16
|
<table class="table table-striped table-bordered table-white table-hover">
|
15
17
|
<caption>Information about lock</caption>
|
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: 8.0.
|
4
|
+
version: 8.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brpoplpush-redis_script
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.4.
|
236
|
+
rubygems_version: 3.4.7
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Sidekiq middleware that prevents duplicates jobs
|