sidekiq-throttled 0.15.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +12 -0
- data/.github/workflows/ci.yml +11 -10
- data/.rubocop.yml +8 -7
- data/.rubocop_todo.yml +39 -3
- data/.travis.yml +2 -4
- data/Appraisals +4 -24
- data/CHANGES.md +44 -0
- data/Gemfile +7 -5
- data/LICENSE.md +1 -0
- data/README.md +36 -36
- data/Rakefile +1 -1
- data/gemfiles/{sidekiq_5.2.gemfile → sidekiq_6.4.gemfile} +8 -6
- data/gemfiles/{sidekiq_5.1.gemfile → sidekiq_6.5.gemfile} +8 -6
- data/lib/sidekiq/throttled/communicator/callbacks.rb +1 -1
- data/lib/sidekiq/throttled/communicator/exception_handler.rb +25 -0
- data/lib/sidekiq/throttled/communicator/listener.rb +1 -1
- data/lib/sidekiq/throttled/communicator.rb +1 -1
- data/lib/sidekiq/throttled/configuration.rb +4 -4
- data/lib/sidekiq/throttled/expirable_list.rb +2 -5
- data/lib/sidekiq/throttled/fetch/unit_of_work.rb +7 -2
- data/lib/sidekiq/throttled/fetch.rb +15 -24
- data/lib/sidekiq/throttled/job.rb +128 -0
- data/lib/sidekiq/throttled/strategy/base.rb +6 -2
- data/lib/sidekiq/throttled/version.rb +1 -1
- data/lib/sidekiq/throttled/web/stats.rb +5 -4
- data/lib/sidekiq/throttled/worker.rb +6 -121
- data/lib/sidekiq/throttled.rb +12 -14
- data/{.rubocop → rubocop}/layout.yml +0 -0
- data/{.rubocop → rubocop}/lint.yml +0 -0
- data/{.rubocop → rubocop}/metrics.yml +0 -0
- data/{.rubocop → rubocop}/performance.yml +0 -0
- data/{.rubocop → rubocop}/rspec.yml +1 -1
- data/{.rubocop → rubocop}/style.yml +0 -0
- data/sidekiq-throttled.gemspec +7 -5
- metadata +22 -23
- data/gemfiles/sidekiq_5.0.gemfile +0 -31
- data/gemfiles/sidekiq_6.0.gemfile +0 -31
- data/gemfiles/sidekiq_6.1.gemfile +0 -31
- data/gemfiles/sidekiq_6.2.gemfile +0 -31
- data/gemfiles/sidekiq_6.3.gemfile +0 -31
@@ -12,29 +12,6 @@ module Sidekiq
|
|
12
12
|
#
|
13
13
|
# @private
|
14
14
|
class Fetch
|
15
|
-
module BulkRequeue
|
16
|
-
# Requeues all given units as a single operation.
|
17
|
-
#
|
18
|
-
# @see http://www.rubydoc.info/github/redis/redis-rb/master/Redis#pipelined-instance_method
|
19
|
-
# @param [Array<Fetch::UnitOfWork>] units
|
20
|
-
# @return [void]
|
21
|
-
def bulk_requeue(units, _options)
|
22
|
-
return if units.empty?
|
23
|
-
|
24
|
-
Sidekiq.logger.debug { "Re-queueing terminated jobs" }
|
25
|
-
Sidekiq.redis { |conn| conn.pipelined { units.each(&:requeue) } }
|
26
|
-
Sidekiq.logger.info("Pushed #{units.size} jobs back to Redis")
|
27
|
-
rescue => e
|
28
|
-
Sidekiq.logger.warn("Failed to requeue #{units.size} jobs: #{e}")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
# https://github.com/mperham/sidekiq/commit/fce05c9d4b4c0411c982078a4cf3a63f20f739bc
|
33
|
-
if Gem::Version.new(Sidekiq::VERSION) < Gem::Version.new("6.1.0")
|
34
|
-
extend BulkRequeue
|
35
|
-
else
|
36
|
-
include BulkRequeue
|
37
|
-
end
|
38
15
|
# Timeout to sleep between fetch retries in case of no job received,
|
39
16
|
# as well as timeout to wait for redis to give us something to work.
|
40
17
|
TIMEOUT = 2
|
@@ -73,6 +50,20 @@ module Sidekiq
|
|
73
50
|
nil
|
74
51
|
end
|
75
52
|
|
53
|
+
def bulk_requeue(units, _options)
|
54
|
+
return if units.empty?
|
55
|
+
|
56
|
+
Sidekiq.logger.debug { "Re-queueing terminated jobs" }
|
57
|
+
Sidekiq.redis do |conn|
|
58
|
+
conn.pipelined do |pipeline|
|
59
|
+
units.each { |unit| unit.requeue(pipeline) }
|
60
|
+
end
|
61
|
+
end
|
62
|
+
Sidekiq.logger.info("Pushed #{units.size} jobs back to Redis")
|
63
|
+
rescue => e
|
64
|
+
Sidekiq.logger.warn("Failed to requeue #{units.size} jobs: #{e}")
|
65
|
+
end
|
66
|
+
|
76
67
|
private
|
77
68
|
|
78
69
|
# Tries to pop pair of `queue` and job `message` out of sidekiq queues.
|
@@ -87,7 +78,7 @@ module Sidekiq
|
|
87
78
|
return
|
88
79
|
end
|
89
80
|
|
90
|
-
Sidekiq.redis { |conn| conn.brpop(*queues, TIMEOUT) }
|
81
|
+
Sidekiq.redis { |conn| conn.brpop(*queues, :timeout => TIMEOUT) }
|
91
82
|
end
|
92
83
|
|
93
84
|
# Returns list of queues to try to fetch jobs from.
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# internal
|
4
|
+
require "sidekiq/throttled/registry"
|
5
|
+
|
6
|
+
module Sidekiq
|
7
|
+
module Throttled
|
8
|
+
# Adds helpers to your worker classes
|
9
|
+
#
|
10
|
+
# @example Usage
|
11
|
+
#
|
12
|
+
# class MyJob
|
13
|
+
# include Sidekiq::Job
|
14
|
+
# include Sidekiq::Throttled::Job
|
15
|
+
#
|
16
|
+
# sidkiq_options :queue => :my_queue
|
17
|
+
# sidekiq_throttle :threshold => { :limit => 123, :period => 1.hour }
|
18
|
+
#
|
19
|
+
# def perform
|
20
|
+
# # ...
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# @see ClassMethods
|
25
|
+
module Job
|
26
|
+
# Extends worker class with {ClassMethods}.
|
27
|
+
#
|
28
|
+
# @note Using `included` hook with extending worker with {ClassMethods}
|
29
|
+
# in order to make API inline with `include Sidekiq::Job`.
|
30
|
+
#
|
31
|
+
# @private
|
32
|
+
def self.included(worker)
|
33
|
+
worker.send(:extend, ClassMethods)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Helper methods added to the singleton class of destination
|
37
|
+
module ClassMethods
|
38
|
+
# Registers some strategy for the worker.
|
39
|
+
#
|
40
|
+
# @example Allow max 123 MyJob jobs per hour
|
41
|
+
#
|
42
|
+
# class MyJob
|
43
|
+
# include Sidekiq::Job
|
44
|
+
# include Sidekiq::Throttled::Job
|
45
|
+
#
|
46
|
+
# sidekiq_throttle({
|
47
|
+
# :threshold => { :limit => 123, :period => 1.hour }
|
48
|
+
# })
|
49
|
+
# end
|
50
|
+
#
|
51
|
+
# @example Allow max 10 concurrently running MyJob jobs
|
52
|
+
#
|
53
|
+
# class MyJob
|
54
|
+
# include Sidekiq::Job
|
55
|
+
# include Sidekiq::Throttled::Job
|
56
|
+
#
|
57
|
+
# sidekiq_throttle({
|
58
|
+
# :concurrency => { :limit => 10 }
|
59
|
+
# })
|
60
|
+
# end
|
61
|
+
#
|
62
|
+
# @example Allow max 10 concurrent MyJob jobs and max 123 per hour
|
63
|
+
#
|
64
|
+
# class MyJob
|
65
|
+
# include Sidekiq::Job
|
66
|
+
# include Sidekiq::Throttled::Job
|
67
|
+
#
|
68
|
+
# sidekiq_throttle({
|
69
|
+
# :threshold => { :limit => 123, :period => 1.hour },
|
70
|
+
# :concurrency => { :limit => 10 }
|
71
|
+
# })
|
72
|
+
# end
|
73
|
+
#
|
74
|
+
# @see Registry.add
|
75
|
+
# @return [void]
|
76
|
+
def sidekiq_throttle(**kwargs)
|
77
|
+
Registry.add(self, **kwargs)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Adds current worker to preconfigured throttling strategy. Allows
|
81
|
+
# sharing same pool for multiple workers.
|
82
|
+
#
|
83
|
+
# First of all we need to create shared throttling strategy:
|
84
|
+
#
|
85
|
+
# # Create google_api throttling strategy
|
86
|
+
# Sidekiq::Throttled::Registry.add(:google_api, {
|
87
|
+
# :threshold => { :limit => 123, :period => 1.hour },
|
88
|
+
# :concurrency => { :limit => 10 }
|
89
|
+
# })
|
90
|
+
#
|
91
|
+
# Now we can assign it to our workers:
|
92
|
+
#
|
93
|
+
# class FetchProfileJob
|
94
|
+
# include Sidekiq::Job
|
95
|
+
# include Sidekiq::Throttled::Job
|
96
|
+
#
|
97
|
+
# sidekiq_throttle_as :google_api
|
98
|
+
# end
|
99
|
+
#
|
100
|
+
# class FetchCommentsJob
|
101
|
+
# include Sidekiq::Job
|
102
|
+
# include Sidekiq::Throttled::Job
|
103
|
+
#
|
104
|
+
# sidekiq_throttle_as :google_api
|
105
|
+
# end
|
106
|
+
#
|
107
|
+
# With the above configuration we ensure that there are maximum 10
|
108
|
+
# concurrently running jobs of FetchProfileJob or FetchCommentsJob
|
109
|
+
# allowed. And only 123 jobs of those are executed per hour.
|
110
|
+
#
|
111
|
+
# In other words, it will allow:
|
112
|
+
#
|
113
|
+
# - only `X` concurrent `FetchProfileJob`s
|
114
|
+
# - max `XX` `FetchProfileJob` per hour
|
115
|
+
# - only `Y` concurrent `FetchCommentsJob`s
|
116
|
+
# - max `YY` `FetchCommentsJob` per hour
|
117
|
+
#
|
118
|
+
# Where `(X + Y) == 10` and `(XX + YY) == 123`
|
119
|
+
#
|
120
|
+
# @see Registry.add_alias
|
121
|
+
# @return [void]
|
122
|
+
def sidekiq_throttle_as(name)
|
123
|
+
Registry.add_alias(self, name)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -12,8 +12,12 @@ module Sidekiq
|
|
12
12
|
|
13
13
|
def key(job_args)
|
14
14
|
key = @base_key.dup
|
15
|
-
key
|
16
|
-
|
15
|
+
return key unless @key_suffix
|
16
|
+
|
17
|
+
key << ":#{@key_suffix.call(*job_args)}"
|
18
|
+
rescue => e
|
19
|
+
Sidekiq.logger.error "Failed to get key suffix: #{e}"
|
20
|
+
raise e
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
@@ -37,7 +37,8 @@ module Sidekiq
|
|
37
37
|
percentile = 100.00 * int / max
|
38
38
|
lvl = if 80 <= percentile then "danger"
|
39
39
|
elsif 60 <= percentile then "warning"
|
40
|
-
else
|
40
|
+
else
|
41
|
+
"success"
|
41
42
|
end
|
42
43
|
|
43
44
|
%(<span class="label label-#{lvl}">#{int}</span>)
|
@@ -61,10 +62,10 @@ module Sidekiq
|
|
61
62
|
|
62
63
|
# @return [String]
|
63
64
|
def humanize_integer(int)
|
64
|
-
digits = int.to_s.
|
65
|
-
str = digits.shift(digits.count % 3).join
|
65
|
+
digits = int.to_s.chars
|
66
|
+
str = digits.shift(digits.count % 3).join
|
66
67
|
|
67
|
-
str << " " << digits.shift(3).join
|
68
|
+
str << " " << digits.shift(3).join while digits.count.positive?
|
68
69
|
|
69
70
|
str.strip
|
70
71
|
end
|
@@ -1,128 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
require "sidekiq/throttled/registry"
|
3
|
+
require "sidekiq/throttled/job"
|
5
4
|
|
6
5
|
module Sidekiq
|
7
6
|
module Throttled
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
|
13
|
-
# include Sidekiq::Worker
|
14
|
-
# include Sidekiq::Throttled::Worker
|
15
|
-
#
|
16
|
-
# sidkiq_options :queue => :my_queue
|
17
|
-
# sidekiq_throttle :threshold => { :limit => 123, :period => 1.hour }
|
18
|
-
#
|
19
|
-
# def perform
|
20
|
-
# # ...
|
21
|
-
# end
|
22
|
-
# end
|
23
|
-
#
|
24
|
-
# @see ClassMethods
|
25
|
-
module Worker
|
26
|
-
# Extends worker class with {ClassMethods}.
|
27
|
-
#
|
28
|
-
# @note Using `included` hook with extending worker with {ClassMethods}
|
29
|
-
# in order to make API inline with `include Sidekiq::Worker`.
|
30
|
-
#
|
31
|
-
# @private
|
32
|
-
def self.included(worker)
|
33
|
-
worker.send(:extend, ClassMethods)
|
34
|
-
end
|
35
|
-
|
36
|
-
# Helper methods added to the singleton class of destination
|
37
|
-
module ClassMethods
|
38
|
-
# Registers some strategy for the worker.
|
39
|
-
#
|
40
|
-
# @example Allow max 123 MyWorker jobs per hour
|
41
|
-
#
|
42
|
-
# class MyWorker
|
43
|
-
# include Sidekiq::Worker
|
44
|
-
# include Sidekiq::Throttled::Worker
|
45
|
-
#
|
46
|
-
# sidekiq_throttle({
|
47
|
-
# :threshold => { :limit => 123, :period => 1.hour }
|
48
|
-
# })
|
49
|
-
# end
|
50
|
-
#
|
51
|
-
# @example Allow max 10 concurrently running MyWorker jobs
|
52
|
-
#
|
53
|
-
# class MyWorker
|
54
|
-
# include Sidekiq::Worker
|
55
|
-
# include Sidekiq::Throttled::Worker
|
56
|
-
#
|
57
|
-
# sidekiq_throttle({
|
58
|
-
# :concurrency => { :limit => 10 }
|
59
|
-
# })
|
60
|
-
# end
|
61
|
-
#
|
62
|
-
# @example Allow max 10 concurrent MyWorker jobs and max 123 per hour
|
63
|
-
#
|
64
|
-
# class MyWorker
|
65
|
-
# include Sidekiq::Worker
|
66
|
-
# include Sidekiq::Throttled::Worker
|
67
|
-
#
|
68
|
-
# sidekiq_throttle({
|
69
|
-
# :threshold => { :limit => 123, :period => 1.hour },
|
70
|
-
# :concurrency => { :limit => 10 }
|
71
|
-
# })
|
72
|
-
# end
|
73
|
-
#
|
74
|
-
# @see Registry.add
|
75
|
-
# @return [void]
|
76
|
-
def sidekiq_throttle(**kwargs)
|
77
|
-
Registry.add(self, **kwargs)
|
78
|
-
end
|
79
|
-
|
80
|
-
# Adds current worker to preconfigured throttling strategy. Allows
|
81
|
-
# sharing same pool for multiple workers.
|
82
|
-
#
|
83
|
-
# First of all we need to create shared throttling strategy:
|
84
|
-
#
|
85
|
-
# # Create google_api throttling strategy
|
86
|
-
# Sidekiq::Throttled::Registry.add(:google_api, {
|
87
|
-
# :threshold => { :limit => 123, :period => 1.hour },
|
88
|
-
# :concurrency => { :limit => 10 }
|
89
|
-
# })
|
90
|
-
#
|
91
|
-
# Now we can assign it to our workers:
|
92
|
-
#
|
93
|
-
# class FetchProfileJob
|
94
|
-
# include Sidekiq::Worker
|
95
|
-
# include Sidekiq::Throttled::Worker
|
96
|
-
#
|
97
|
-
# sidekiq_throttle_as :google_api
|
98
|
-
# end
|
99
|
-
#
|
100
|
-
# class FetchCommentsJob
|
101
|
-
# include Sidekiq::Worker
|
102
|
-
# include Sidekiq::Throttled::Worker
|
103
|
-
#
|
104
|
-
# sidekiq_throttle_as :google_api
|
105
|
-
# end
|
106
|
-
#
|
107
|
-
# With the above configuration we ensure that there are maximum 10
|
108
|
-
# concurrently running jobs of FetchProfileJob or FetchCommentsJob
|
109
|
-
# allowed. And only 123 jobs of those are executed per hour.
|
110
|
-
#
|
111
|
-
# In other words, it will allow:
|
112
|
-
#
|
113
|
-
# - only `X` concurrent `FetchProfileJob`s
|
114
|
-
# - max `XX` `FetchProfileJob` per hour
|
115
|
-
# - only `Y` concurrent `FetchCommentsJob`s
|
116
|
-
# - max `YY` `FetchCommentsJob` per hour
|
117
|
-
#
|
118
|
-
# Where `(X + Y) == 10` and `(XX + YY) == 123`
|
119
|
-
#
|
120
|
-
# @see Registry.add_alias
|
121
|
-
# @return [void]
|
122
|
-
def sidekiq_throttle_as(name)
|
123
|
-
Registry.add_alias(self, name)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
7
|
+
# A new module, Sidekiq::Job, was added in Sidekiq version 6.3.0 as a
|
8
|
+
# simple alias for Sidekiq::Worker as the term "worker" was considered
|
9
|
+
# too generic and confusing. Many people call a Sidekiq process a "worker"
|
10
|
+
# whereas others call the thread that executes jobs a "worker".
|
11
|
+
Worker = Job
|
127
12
|
end
|
128
13
|
end
|
data/lib/sidekiq/throttled.rb
CHANGED
@@ -9,6 +9,7 @@ require "sidekiq/throttled/communicator"
|
|
9
9
|
require "sidekiq/throttled/configuration"
|
10
10
|
require "sidekiq/throttled/queues_pauser"
|
11
11
|
require "sidekiq/throttled/registry"
|
12
|
+
require "sidekiq/throttled/job"
|
12
13
|
require "sidekiq/throttled/worker"
|
13
14
|
require "sidekiq/throttled/utils"
|
14
15
|
|
@@ -21,12 +22,12 @@ module Sidekiq
|
|
21
22
|
# require "sidekiq/throttled"
|
22
23
|
# Sidekiq::Throttled.setup!
|
23
24
|
#
|
24
|
-
# Once you've done that you can include {Sidekiq::Throttled::
|
25
|
+
# Once you've done that you can include {Sidekiq::Throttled::Job} to your
|
25
26
|
# job classes and configure throttling:
|
26
27
|
#
|
27
|
-
# class
|
28
|
-
# include Sidekiq::
|
29
|
-
# include Sidekiq::Throttled::
|
28
|
+
# class MyJob
|
29
|
+
# include Sidekiq::Job
|
30
|
+
# include Sidekiq::Throttled::Job
|
30
31
|
#
|
31
32
|
# sidekiq_options :queue => :my_queue
|
32
33
|
#
|
@@ -61,7 +62,7 @@ module Sidekiq
|
|
61
62
|
QueuesPauser.instance.setup!
|
62
63
|
|
63
64
|
Sidekiq.configure_server do |config|
|
64
|
-
setup_strategy!
|
65
|
+
setup_strategy!(config)
|
65
66
|
|
66
67
|
require "sidekiq/throttled/middleware"
|
67
68
|
config.server_middleware do |chain|
|
@@ -76,7 +77,7 @@ module Sidekiq
|
|
76
77
|
# @return [Boolean]
|
77
78
|
def throttled?(message)
|
78
79
|
message = JSON.parse message
|
79
|
-
job = message.fetch("class") { return false }
|
80
|
+
job = message.fetch("wrapped") { message.fetch("class") { return false } }
|
80
81
|
jid = message.fetch("jid") { return false }
|
81
82
|
|
82
83
|
preload_constant! job
|
@@ -93,16 +94,13 @@ module Sidekiq
|
|
93
94
|
private
|
94
95
|
|
95
96
|
# @return [void]
|
96
|
-
def setup_strategy!
|
97
|
+
def setup_strategy!(sidekiq_config)
|
97
98
|
require "sidekiq/throttled/fetch"
|
98
99
|
|
99
|
-
# https://github.com/mperham/sidekiq/commit/
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
else
|
104
|
-
Sidekiq::Throttled::Fetch.new(Sidekiq.options)
|
105
|
-
end
|
100
|
+
# https://github.com/mperham/sidekiq/commit/67daa7a408b214d593100f782271ed108686c147
|
101
|
+
sidekiq_config = sidekiq_config.options if Gem::Version.new(Sidekiq::VERSION) < Gem::Version.new("6.5.0")
|
102
|
+
|
103
|
+
sidekiq_config[:fetch] = Sidekiq::Throttled::Fetch.new(sidekiq_config)
|
106
104
|
end
|
107
105
|
|
108
106
|
# Tries to preload constant by it's name once.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/sidekiq-throttled.gemspec
CHANGED
@@ -8,27 +8,29 @@ require "sidekiq/throttled/version"
|
|
8
8
|
Gem::Specification.new do |spec|
|
9
9
|
spec.name = "sidekiq-throttled"
|
10
10
|
spec.version = Sidekiq::Throttled::VERSION
|
11
|
-
spec.authors = ["Alexey
|
12
|
-
spec.email = ["
|
11
|
+
spec.authors = ["Alexey Zapparov"]
|
12
|
+
spec.email = ["alexey@zapparov.com"]
|
13
13
|
|
14
14
|
spec.summary = "Concurrency and threshold throttling for Sidekiq."
|
15
15
|
spec.description = "Concurrency and threshold throttling for Sidekiq."
|
16
|
-
spec.homepage = "https://github.com/
|
16
|
+
spec.homepage = "https://github.com/ixti/sidekiq-throttled"
|
17
17
|
spec.license = "MIT"
|
18
18
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
20
|
f.match %r{^(test|spec|features)/}
|
21
21
|
end
|
22
22
|
|
23
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
24
|
+
|
23
25
|
spec.bindir = "exe"
|
24
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
27
|
spec.require_paths = ["lib"]
|
26
28
|
|
27
|
-
spec.required_ruby_version = ">= 2.
|
29
|
+
spec.required_ruby_version = ">= 2.7"
|
28
30
|
|
29
31
|
spec.add_runtime_dependency "concurrent-ruby"
|
30
32
|
spec.add_runtime_dependency "redis-prescription"
|
31
|
-
spec.add_runtime_dependency "sidekiq"
|
33
|
+
spec.add_runtime_dependency "sidekiq", ">= 6.4"
|
32
34
|
|
33
35
|
spec.add_development_dependency "bundler", ">= 2.0"
|
34
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.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Alexey
|
7
|
+
- Alexey Zapparov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
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
|
-
version: '
|
54
|
+
version: '6.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,22 +68,17 @@ dependencies:
|
|
68
68
|
version: '2.0'
|
69
69
|
description: Concurrency and threshold throttling for Sidekiq.
|
70
70
|
email:
|
71
|
-
-
|
71
|
+
- alexey@zapparov.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".coveralls.yml"
|
77
|
+
- ".github/dependabot.yml"
|
77
78
|
- ".github/workflows/ci.yml"
|
78
79
|
- ".gitignore"
|
79
80
|
- ".rspec"
|
80
81
|
- ".rubocop.yml"
|
81
|
-
- ".rubocop/layout.yml"
|
82
|
-
- ".rubocop/lint.yml"
|
83
|
-
- ".rubocop/metrics.yml"
|
84
|
-
- ".rubocop/performance.yml"
|
85
|
-
- ".rubocop/rspec.yml"
|
86
|
-
- ".rubocop/style.yml"
|
87
82
|
- ".rubocop_todo.yml"
|
88
83
|
- ".travis.yml"
|
89
84
|
- ".yardopts"
|
@@ -94,22 +89,19 @@ files:
|
|
94
89
|
- LICENSE.md
|
95
90
|
- README.md
|
96
91
|
- Rakefile
|
97
|
-
- gemfiles/
|
98
|
-
- gemfiles/
|
99
|
-
- gemfiles/sidekiq_5.2.gemfile
|
100
|
-
- gemfiles/sidekiq_6.0.gemfile
|
101
|
-
- gemfiles/sidekiq_6.1.gemfile
|
102
|
-
- gemfiles/sidekiq_6.2.gemfile
|
103
|
-
- gemfiles/sidekiq_6.3.gemfile
|
92
|
+
- gemfiles/sidekiq_6.4.gemfile
|
93
|
+
- gemfiles/sidekiq_6.5.gemfile
|
104
94
|
- lib/sidekiq/throttled.rb
|
105
95
|
- lib/sidekiq/throttled/communicator.rb
|
106
96
|
- lib/sidekiq/throttled/communicator/callbacks.rb
|
97
|
+
- lib/sidekiq/throttled/communicator/exception_handler.rb
|
107
98
|
- lib/sidekiq/throttled/communicator/listener.rb
|
108
99
|
- lib/sidekiq/throttled/configuration.rb
|
109
100
|
- lib/sidekiq/throttled/errors.rb
|
110
101
|
- lib/sidekiq/throttled/expirable_list.rb
|
111
102
|
- lib/sidekiq/throttled/fetch.rb
|
112
103
|
- lib/sidekiq/throttled/fetch/unit_of_work.rb
|
104
|
+
- lib/sidekiq/throttled/job.rb
|
113
105
|
- lib/sidekiq/throttled/middleware.rb
|
114
106
|
- lib/sidekiq/throttled/patches/queue.rb
|
115
107
|
- lib/sidekiq/throttled/queue_name.rb
|
@@ -132,11 +124,18 @@ files:
|
|
132
124
|
- lib/sidekiq/throttled/web/summary_fix.rb
|
133
125
|
- lib/sidekiq/throttled/web/throttled.html.erb
|
134
126
|
- lib/sidekiq/throttled/worker.rb
|
127
|
+
- rubocop/layout.yml
|
128
|
+
- rubocop/lint.yml
|
129
|
+
- rubocop/metrics.yml
|
130
|
+
- rubocop/performance.yml
|
131
|
+
- rubocop/rspec.yml
|
132
|
+
- rubocop/style.yml
|
135
133
|
- sidekiq-throttled.gemspec
|
136
|
-
homepage: https://github.com/
|
134
|
+
homepage: https://github.com/ixti/sidekiq-throttled
|
137
135
|
licenses:
|
138
136
|
- MIT
|
139
|
-
metadata:
|
137
|
+
metadata:
|
138
|
+
rubygems_mfa_required: 'true'
|
140
139
|
post_install_message:
|
141
140
|
rdoc_options: []
|
142
141
|
require_paths:
|
@@ -145,14 +144,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
144
|
requirements:
|
146
145
|
- - ">="
|
147
146
|
- !ruby/object:Gem::Version
|
148
|
-
version: '2.
|
147
|
+
version: '2.7'
|
149
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
149
|
requirements:
|
151
150
|
- - ">="
|
152
151
|
- !ruby/object:Gem::Version
|
153
152
|
version: '0'
|
154
153
|
requirements: []
|
155
|
-
rubygems_version: 3.2.
|
154
|
+
rubygems_version: 3.2.33
|
156
155
|
signing_key:
|
157
156
|
specification_version: 4
|
158
157
|
summary: Concurrency and threshold throttling for Sidekiq.
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "appraisal"
|
6
|
-
gem "rake"
|
7
|
-
gem "rspec"
|
8
|
-
gem "rubocop", "~> 0.90.0", require: false
|
9
|
-
gem "rubocop-performance", "~> 1.8.0", require: false
|
10
|
-
gem "rubocop-rspec", "~> 1.43.2", require: false
|
11
|
-
gem "sidekiq", "~> 5.0.0"
|
12
|
-
|
13
|
-
group :development do
|
14
|
-
gem "byebug"
|
15
|
-
gem "guard", require: false
|
16
|
-
gem "guard-rspec", require: false
|
17
|
-
gem "guard-rubocop", require: false
|
18
|
-
end
|
19
|
-
|
20
|
-
group :test do
|
21
|
-
gem "apparition"
|
22
|
-
gem "capybara"
|
23
|
-
gem "coveralls", require: false
|
24
|
-
gem "puma"
|
25
|
-
gem "rack-test"
|
26
|
-
gem "simplecov"
|
27
|
-
gem "sinatra"
|
28
|
-
gem "timecop"
|
29
|
-
end
|
30
|
-
|
31
|
-
gemspec path: "../"
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "appraisal"
|
6
|
-
gem "rake"
|
7
|
-
gem "rspec"
|
8
|
-
gem "rubocop", "~> 0.90.0", require: false
|
9
|
-
gem "rubocop-performance", "~> 1.8.0", require: false
|
10
|
-
gem "rubocop-rspec", "~> 1.43.2", require: false
|
11
|
-
gem "sidekiq", "~> 6.0.0"
|
12
|
-
|
13
|
-
group :development do
|
14
|
-
gem "byebug"
|
15
|
-
gem "guard", require: false
|
16
|
-
gem "guard-rspec", require: false
|
17
|
-
gem "guard-rubocop", require: false
|
18
|
-
end
|
19
|
-
|
20
|
-
group :test do
|
21
|
-
gem "apparition"
|
22
|
-
gem "capybara"
|
23
|
-
gem "coveralls", require: false
|
24
|
-
gem "puma"
|
25
|
-
gem "rack-test"
|
26
|
-
gem "simplecov"
|
27
|
-
gem "sinatra"
|
28
|
-
gem "timecop"
|
29
|
-
end
|
30
|
-
|
31
|
-
gemspec path: "../"
|