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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18fddfafacb221ce072d4bdcb5c16b0b4e27547d5129eec69ed91ca981d8b66b
4
- data.tar.gz: 05d851bde2e91b6ecea881fa1227d74037dd57dcb98e97961349391a26a6a755
3
+ metadata.gz: 820d13b5365e9a4af437b1fecaebec61f4c07656b6aa77e49fff21186abc9088
4
+ data.tar.gz: 0b90028e6697ec459ff63094e063100878080ad4a18101a60b7682a554c9b5f6
5
5
  SHA512:
6
- metadata.gz: 444ff4c25066f950d49d5ebcf4223368418f7ae6594f3a23ca12e71a1077de46bbdb8498529af4ad29f4d28e128b079afdc2d1b67f28eeeac3118cec85bd287b
7
- data.tar.gz: 69ff924fe4bf0b3a181afdc0c11b8bc97e592435ae7e44873356b9a90277d4c8a76c93f2916d0c8d6fef17075ff66de43997095218e872271cbb3012ba95aaf6
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 = get_key(key)
50
- @created_at = time.is_a?(Float) ? time : time.to_f
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]) == "true"
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] == "true"
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] == "true"
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] == "true"
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] == "true"
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] == "true"
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] == "true"
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] == "true"
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] == "true"
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]
@@ -9,11 +9,6 @@ local function toversion(version)
9
9
  }
10
10
  end
11
11
 
12
- local function toboolean(val)
13
- val = tostring(val)
14
- return val == "1" or val == "true"
15
- end
16
-
17
12
  local function log_debug( ... )
18
13
  if debug_lua ~= true then return end
19
14
 
@@ -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] == "true"
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] == "true"
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] == "true"
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]
@@ -3,5 +3,5 @@
3
3
  module SidekiqUniqueJobs
4
4
  #
5
5
  # @return [String] the current SidekiqUniqueJobs version
6
- VERSION = "8.0.1"
6
+ VERSION = "8.0.2"
7
7
  end
@@ -146,6 +146,8 @@ module SidekiqUniqueJobs
146
146
  # @return [String] a html safe string with relative time information
147
147
  #
148
148
  def safe_relative_time(time)
149
+ return unless time
150
+
149
151
  time = parse_time(time)
150
152
 
151
153
  relative_time(time)
@@ -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
- <p>To use it turn the following setting on:
11
- <code>SidekiqUniqueJobs.config.lock_info = true</code>
12
- </p>
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.1
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-02-14 00:00:00.000000000 Z
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.6
236
+ rubygems_version: 3.4.7
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: Sidekiq middleware that prevents duplicates jobs