sidekiq-unique-jobs 8.0.6 → 8.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f2baa17d73480d2a3af58b1202e5145935944abebfddbd94a199248df87e729
4
- data.tar.gz: 11037fd5c6ed9a61452026541c874928ec0d465def211c7f34e91d7d1bb23bb2
3
+ metadata.gz: e78e60a582191ec8a31f1e9ea285cac31822d7db0b3cb1ccc01f4817e6ae9ec8
4
+ data.tar.gz: 763066d805dc4d838acc261e30cfd4e51294d3cbccbb64592c649db7d6792330
5
5
  SHA512:
6
- metadata.gz: 927072c34b1b7131352dbfe5ccd269bace168d601977dfcb63199183033202b6ec04824612620375b336de9e06501a2b39237370357494af66a376385260faa3
7
- data.tar.gz: cb615cce8db1b353f0b12790ee35019c709586f94b497d5543ef43a50a782b1e09c47371ddd28b810243b15e7d983030c5a56999ef7535745f4596890fc983dd
6
+ metadata.gz: 49edc930fa619573b29e3c9972031217ee92357377afcecf651dda2855fa30bb5c401bf4f6545ab3e59f98605cc9a3856b665f0bd865608b856534c31a798c6e
7
+ data.tar.gz: ff4677bd8c0e8775ddb264b905c59070f884c1f4ef8dd5c58d680f180af3d4b9d09db9d8ecf730f7804b3ef871a587dd1f3fc886cc12f58187f3a86ebe8adbc4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v8.0.6...HEAD)
6
+
7
+ **Closed issues:**
8
+
9
+ - No 'Changelog' link is being displayed on https://rubygems.org/gems/sidekiq-unique-jobs [\#825](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/825)
10
+
11
+ ## [v8.0.6](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v8.0.6) (2024-01-24)
12
+
13
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v8.0.5...v8.0.6)
14
+
15
+ **Implemented enhancements:**
16
+
17
+ - Returning same job id [\#814](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/814)
18
+ - fix: various minor issues [\#826](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/826) ([mhenrixon](https://github.com/mhenrixon))
19
+
20
+ **Closed issues:**
21
+
22
+ - should respond to `has_valid_sidekiq_options?` [\#822](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/822)
23
+ - Reaper manager registration is subject to race conditions [\#801](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/801)
24
+ - `while_executing` with `on_conflict: :reschedule` Reschedule job after job execution [\#800](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/800)
25
+ - Large retry queue causes reaper to run too slow [\#759](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/759)
26
+
27
+ **Merged pull requests:**
28
+
29
+ - fix: skip unless reaper was registered [\#820](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/820) ([mhenrixon](https://github.com/mhenrixon))
30
+
3
31
  ## [v8.0.5](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v8.0.5) (2023-11-11)
4
32
 
5
33
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v8.0.4...v8.0.5)
@@ -15,7 +43,7 @@
15
43
 
16
44
  ## [v8.0.4](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v8.0.4) (2023-11-11)
17
45
 
18
- [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.30...v8.0.4)
46
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.31...v8.0.4)
19
47
 
20
48
  **Implemented enhancements:**
21
49
 
@@ -31,9 +59,6 @@
31
59
  **Closed issues:**
32
60
 
33
61
  - register\_reaper\_process nx: true crash Sidekiq on startup [\#817](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/817)
34
- - Should client middleware also be added to the Sidekiq server config? [\#803](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/803)
35
- - 8.0.1 Time on locks & changelog UI is incorrect/wrong [\#761](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/761)
36
- - Job executed twice when reaper runs [\#738](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/738)
37
62
 
38
63
  **Merged pull requests:**
39
64
 
@@ -42,6 +67,16 @@
42
67
  - Handle strategy fallbacks properly [\#809](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/809) ([matejrisek](https://github.com/matejrisek))
43
68
  - Fix CI status badge [\#802](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/802) ([tagliala](https://github.com/tagliala))
44
69
 
70
+ ## [v7.1.31](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.1.31) (2023-08-28)
71
+
72
+ [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v7.1.30...v7.1.31)
73
+
74
+ **Closed issues:**
75
+
76
+ - Should client middleware also be added to the Sidekiq server config? [\#803](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/803)
77
+ - 8.0.1 Time on locks & changelog UI is incorrect/wrong [\#761](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/761)
78
+ - Job executed twice when reaper runs [\#738](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/738)
79
+
45
80
  ## [v7.1.30](https://github.com/mhenrixon/sidekiq-unique-jobs/tree/v7.1.30) (2023-07-17)
46
81
 
47
82
  [Full Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/compare/v8.0.3...v7.1.30)
@@ -903,7 +938,7 @@
903
938
  **Fixed bugs:**
904
939
 
905
940
  - V7 - `on_conflict:` no longer accepts a Hash [\#495](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/495)
906
- - Brpoplpush::RedisScript::LuaError: WRONGTYPE Operation against a key holding the wrong kind of value [\#491](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/491)
941
+ - SidekiqUniqueJobs::Script::LuaError: WRONGTYPE Operation against a key holding the wrong kind of value [\#491](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/491)
907
942
  - Lua script bug [\#489](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/489)
908
943
  - Reaper will delete locks for running jobs [\#488](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/488)
909
944
  - Fix access to hash members [\#496](https://github.com/mhenrixon/sidekiq-unique-jobs/pull/496) ([mhenrixon](https://github.com/mhenrixon))
@@ -1656,7 +1691,7 @@
1656
1691
  - deprecation warnings with redis-namespace 2.0 [\#212](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/212)
1657
1692
  - Unclear docs / examples for unique\_args [\#211](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/211)
1658
1693
  - Jobs Console fails to launch [\#208](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/208)
1659
- - Util.del Redis::CommandError: ERR syntax error [\#207](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/207)
1694
+ - Util.del RedisClient::CommandError: ERR syntax error [\#207](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/207)
1660
1695
  - version 4.0.19 [\#206](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/206)
1661
1696
  - Job.delete does not remove lock in all circumstances [\#205](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/205)
1662
1697
  - disappearing jobs - known issue in conjunction with other extensions? [\#202](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/202)
@@ -1846,7 +1881,7 @@
1846
1881
 
1847
1882
  - Rails + Sidekiq will go bezerk after sidekiq-unique-jobs testing check. [\#128](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/128)
1848
1883
  - NoMethodError: undefined method `to\_sym' for true:TrueClass [\#125](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/125)
1849
- - Redis::CommandError: ERR unknown command 'eval' [\#124](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/124)
1884
+ - RedisClient::CommandError: ERR unknown command 'eval' [\#124](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/124)
1850
1885
 
1851
1886
  **Merged pull requests:**
1852
1887
 
@@ -1909,7 +1944,7 @@
1909
1944
 
1910
1945
  **Closed issues:**
1911
1946
 
1912
- - 3.0.14 Error: ERR wrong number of arguments for 'set' command \(Redis::CommandError\) [\#104](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/104)
1947
+ - 3.0.14 Error: ERR wrong number of arguments for 'set' command \(RedisClient::CommandError\) [\#104](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/104)
1913
1948
  - Testing [\#103](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/103)
1914
1949
  - Active Job [\#102](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/102)
1915
1950
  - Why is SidekiqUnique behaviour applied to regular Workers? [\#100](https://github.com/mhenrixon/sidekiq-unique-jobs/issues/100)
data/README.md CHANGED
@@ -582,8 +582,6 @@ end
582
582
  #spec/workers/bad_worker_spec.rb
583
583
 
584
584
  require "sidekiq_unique_jobs/testing"
585
- #OR
586
- require "sidekiq_unique_jobs/rspec/matchers"
587
585
 
588
586
  RSpec.describe BadWorker do
589
587
  specify { expect(described_class).to have_valid_sidekiq_options }
@@ -816,7 +814,7 @@ In my benchmarks deleting 1000 orphaned locks with lua performs around 65% faste
816
814
 
817
815
  On the other hand if I increase it to 10 000 orphaned locks per cleanup (`reaper_count: 10_0000`) then redis starts throwing:
818
816
 
819
- > BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE. (Redis::CommandError)
817
+ > BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE. (RedisClient::CommandError)
820
818
 
821
819
  If you want to disable the reaper set it to `:none`, `nil` or `false`. Actually, any value that isn't `:ruby` or `:lua` will disable the reaping.
822
820
 
@@ -66,12 +66,7 @@ module SidekiqUniqueJobs
66
66
  end
67
67
 
68
68
  def load(conn)
69
- @sha =
70
- if conn.respond_to?(:namespace)
71
- conn.redis.script(:load, source)
72
- else
73
- conn.script(:load, source)
74
- end
69
+ @sha = conn.script(:load, source)
75
70
 
76
71
  self
77
72
  end
@@ -3,5 +3,5 @@
3
3
  module SidekiqUniqueJobs
4
4
  #
5
5
  # @return [String] the current SidekiqUniqueJobs version
6
- VERSION = "8.0.6"
6
+ VERSION = "8.0.7"
7
7
  end
@@ -13,11 +13,11 @@ module SidekiqUniqueJobs
13
13
  end
14
14
 
15
15
  app.get "/changelogs" do
16
- @filter = params[:filter] || "*"
16
+ @filter = h(params[:filter] || "*")
17
17
  @filter = "*" if @filter == ""
18
- @count = (params[:count] || 100).to_i
19
- @current_cursor = params[:cursor].to_i
20
- @prev_cursor = params[:prev_cursor].to_i
18
+ @count = h(params[:count] || 100).to_i
19
+ @current_cursor = h(params[:cursor]).to_i
20
+ @prev_cursor = h(params[:prev_cursor]).to_i
21
21
  @total_size, @next_cursor, @changelogs = changelog.page(
22
22
  cursor: @current_cursor,
23
23
  pattern: @filter,
@@ -33,11 +33,11 @@ module SidekiqUniqueJobs
33
33
  end
34
34
 
35
35
  app.get "/locks" do
36
- @filter = params[:filter] || "*"
36
+ @filter = h(params[:filter]) || "*"
37
37
  @filter = "*" if @filter == ""
38
- @count = (params[:count] || 100).to_i
39
- @current_cursor = params[:cursor].to_i
40
- @prev_cursor = params[:prev_cursor].to_i
38
+ @count = h(params[:count] || 100).to_i
39
+ @current_cursor = h(params[:cursor]).to_i
40
+ @prev_cursor = h(params[:prev_cursor]).to_i
41
41
 
42
42
  @total_size, @next_cursor, @locks = digests.page(
43
43
  cursor: @current_cursor,
@@ -49,11 +49,11 @@ module SidekiqUniqueJobs
49
49
  end
50
50
 
51
51
  app.get "/expiring_locks" do
52
- @filter = params[:filter] || "*"
52
+ @filter = h(params[:filter]) || "*"
53
53
  @filter = "*" if @filter == ""
54
- @count = (params[:count] || 100).to_i
55
- @current_cursor = params[:cursor].to_i
56
- @prev_cursor = params[:prev_cursor].to_i
54
+ @count = h(params[:count] || 100).to_i
55
+ @current_cursor = h(params[:cursor]).to_i
56
+ @prev_cursor = h(params[:prev_cursor]).to_i
57
57
 
58
58
  @total_size, @next_cursor, @locks = expiring_digests.page(
59
59
  cursor: @current_cursor,
@@ -71,20 +71,20 @@ module SidekiqUniqueJobs
71
71
  end
72
72
 
73
73
  app.get "/locks/:digest" do
74
- @digest = params[:digest]
74
+ @digest = h(params[:digest])
75
75
  @lock = SidekiqUniqueJobs::Lock.new(@digest)
76
76
 
77
77
  erb(unique_template(:lock))
78
78
  end
79
79
 
80
80
  app.get "/locks/:digest/delete" do
81
- digests.delete_by_digest(params[:digest])
82
- expiring_digests.delete_by_digest(params[:digest])
81
+ digests.delete_by_digest(h(params[:digest]))
82
+ expiring_digests.delete_by_digest(h(params[:digest]))
83
83
  redirect_to :locks
84
84
  end
85
85
 
86
86
  app.get "/locks/:digest/jobs/:job_id/delete" do
87
- @digest = params[:digest]
87
+ @digest = h(params[:digest])
88
88
  @lock = SidekiqUniqueJobs::Lock.new(@digest)
89
89
  @lock.unlock(params[:job_id])
90
90
 
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.6
4
+ version: 8.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby