sidekiq-throttled 0.17.0 → 0.18.0

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: 1a4884da942e03171d7265651258f4da2ca601aa36219192b325a2ce0ff113fd
4
- data.tar.gz: 7b1d20e64db0cf3720f4b404a95744b77de186da718feb7f6abd7cd23623e08d
3
+ metadata.gz: 9709e5805bd1bf11ef204afb08a988a4c5998e16ecf8a7a0b8e0c1b4b753ce4d
4
+ data.tar.gz: 21b5bdd50945f807e11884a18449be0155cb8bdf2b6ee37b633148b198db615d
5
5
  SHA512:
6
- metadata.gz: 93699777efb1fd7794a7e566d6b129b0898f8efb327627b2a17b5e3e595a100fedc8b5a064ab8331b61c553cdd4a3aa2f3ac57c76d9d677c16ef006df18c592d
7
- data.tar.gz: 9aaa27dbd6c116fbeac961cb8f8d1413bc1b9ff84241cfa81ce4b63b479a0b2386d6de8c94a6176a461d4f50867ce80957fd4b4569b5bd9db377d41fafbb247c
6
+ metadata.gz: 613164a091883655c4bd879b3dab25198ffc88e49eb7f1e1b0bab33eb2a7eb004b2f6d407e65ccfea52727e347f1b5d8c05015117b5da8500a2a933228044ef4
7
+ data.tar.gz: 9b2dde3fd9ecdf25301597bd86609f531f7a8b5d8a90833f7f0d42399501a3d49252fa78af3cc576007cdf8b7025b86223c1a9d1391ab9069c6277220adb7524
data/CHANGES.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 0.18.0 (2023-04-10)
2
+
3
+ * Fix redis-prescription dependency usage
4
+
5
+ ## 0.17.0 (2022-09-14)
6
+
7
+ * [#13](https://github.com/ixti/sidekiq-throttled/pull/13)
8
+ Fix redis-4.8+ deprecation warnings
9
+
10
+ * [#8](https://github.com/ixti/sidekiq-throttled/pull/8)
11
+ Drop Sidekiq < 6.4 support
12
+
13
+ ## 0.16.2 (2022-07-19)
14
+
15
+ * [#5](https://github.com/ixti/sidekiq-throttled/issues/5)
16
+ [#6](https://github.com/ixti/sidekiq-throttled/pull/6)
17
+ Add Sidekiq 6.5+ support
18
+
1
19
  ## 0.16.1 (2022-06-14)
2
20
 
3
21
  * [#2](https://github.com/ixti/sidekiq-throttled/pull/2)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "redis/prescription"
3
+ require "redis_prescription"
4
4
 
5
5
  require "sidekiq/throttled/strategy/base"
6
6
 
@@ -20,7 +20,7 @@ module Sidekiq
20
20
  # PUSH(@key, @jid)
21
21
  # return 0
22
22
  # end
23
- SCRIPT = Redis::Prescription.read "#{__dir__}/concurrency.lua"
23
+ SCRIPT = RedisPrescription.new(File.read("#{__dir__}/concurrency.lua"))
24
24
  private_constant :SCRIPT
25
25
 
26
26
  # @param [#to_s] strategy_key
@@ -50,7 +50,7 @@ module Sidekiq
50
50
  argv = [jid.to_s, job_limit, @ttl, Time.now.to_f]
51
51
 
52
52
  Sidekiq.redis do |redis|
53
- 1 == SCRIPT.eval(redis, :keys => keys, :argv => argv)
53
+ 1 == SCRIPT.call(redis, :keys => keys, :argv => argv)
54
54
  end
55
55
  end
56
56
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "redis/prescription"
3
+ require "redis_prescription"
4
4
 
5
5
  require "sidekiq/throttled/strategy/base"
6
6
 
@@ -30,7 +30,7 @@ module Sidekiq
30
30
  #
31
31
  # increase!
32
32
  # return 0
33
- SCRIPT = Redis::Prescription.read "#{__dir__}/threshold.lua"
33
+ SCRIPT = RedisPrescription.new(File.read("#{__dir__}/threshold.lua"))
34
34
  private_constant :SCRIPT
35
35
 
36
36
  # @param [#to_s] strategy_key
@@ -67,7 +67,7 @@ module Sidekiq
67
67
  argv = [job_limit, period(job_args), Time.now.to_f]
68
68
 
69
69
  Sidekiq.redis do |redis|
70
- 1 == SCRIPT.eval(redis, :keys => keys, :argv => argv)
70
+ 1 == SCRIPT.call(redis, :keys => keys, :argv => argv)
71
71
  end
72
72
  end
73
73
 
@@ -3,6 +3,6 @@
3
3
  module Sidekiq
4
4
  module Throttled
5
5
  # Gem version
6
- VERSION = "0.17.0"
6
+ VERSION = "0.18.0"
7
7
  end
8
8
  end
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.required_ruby_version = ">= 2.7"
30
30
 
31
31
  spec.add_runtime_dependency "concurrent-ruby"
32
- spec.add_runtime_dependency "redis-prescription"
33
- spec.add_runtime_dependency "sidekiq", ">= 6.4"
32
+ spec.add_runtime_dependency "redis-prescription", "~> 2.2"
33
+ spec.add_runtime_dependency "sidekiq", "~> 6.4"
34
34
 
35
35
  spec.add_development_dependency "bundler", ">= 2.0"
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-throttled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Zapparov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2023-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -28,28 +28,28 @@ dependencies:
28
28
  name: redis-prescription
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '2.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sidekiq
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '6.4'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '6.4'
55
55
  - !ruby/object:Gem::Dependency
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.2.33
154
+ rubygems_version: 3.3.26
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Concurrency and threshold throttling for Sidekiq.