sidekiq-throttled 0.16.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +332 -0
- data/lib/sidekiq/throttled/config.rb +44 -0
- data/lib/sidekiq/throttled/cooldown.rb +55 -0
- data/lib/sidekiq/throttled/expirable_set.rb +70 -0
- data/lib/sidekiq/throttled/job.rb +4 -4
- data/lib/sidekiq/throttled/message.rb +32 -0
- data/lib/sidekiq/throttled/middlewares/server.rb +28 -0
- data/lib/sidekiq/throttled/patches/basic_fetch.rb +45 -0
- data/lib/sidekiq/throttled/patches/super_fetch.rb +52 -0
- data/lib/sidekiq/throttled/patches/throttled_retriever.rb +26 -0
- data/lib/sidekiq/throttled/registry.rb +4 -7
- data/lib/sidekiq/throttled/strategy/base.rb +1 -1
- data/lib/sidekiq/throttled/strategy/concurrency.rb +4 -6
- data/lib/sidekiq/throttled/strategy/threshold.rb +4 -6
- data/lib/sidekiq/throttled/strategy.rb +10 -10
- data/lib/sidekiq/throttled/strategy_collection.rb +8 -9
- data/lib/sidekiq/throttled/version.rb +1 -1
- data/lib/sidekiq/throttled/web.rb +2 -45
- data/lib/sidekiq/throttled/worker.rb +1 -1
- data/lib/sidekiq/throttled.rb +46 -67
- metadata +27 -73
- data/.coveralls.yml +0 -1
- data/.github/dependabot.yml +0 -12
- data/.github/workflows/ci.yml +0 -52
- data/.gitignore +0 -12
- data/.rspec +0 -5
- data/.rubocop.yml +0 -20
- data/.rubocop_todo.yml +0 -68
- data/.travis.yml +0 -39
- data/.yardopts +0 -1
- data/Appraisals +0 -25
- data/CHANGES.md +0 -300
- data/Gemfile +0 -34
- data/Guardfile +0 -25
- data/README.md +0 -301
- data/Rakefile +0 -27
- data/gemfiles/sidekiq_6.0.gemfile +0 -33
- data/gemfiles/sidekiq_6.1.gemfile +0 -33
- data/gemfiles/sidekiq_6.2.gemfile +0 -33
- data/gemfiles/sidekiq_6.3.gemfile +0 -33
- data/gemfiles/sidekiq_6.4.gemfile +0 -33
- data/gemfiles/sidekiq_6.5.gemfile +0 -33
- data/lib/sidekiq/throttled/communicator/callbacks.rb +0 -72
- data/lib/sidekiq/throttled/communicator/exception_handler.rb +0 -25
- data/lib/sidekiq/throttled/communicator/listener.rb +0 -109
- data/lib/sidekiq/throttled/communicator.rb +0 -116
- data/lib/sidekiq/throttled/configuration.rb +0 -50
- data/lib/sidekiq/throttled/expirable_list.rb +0 -70
- data/lib/sidekiq/throttled/fetch/unit_of_work.rb +0 -83
- data/lib/sidekiq/throttled/fetch.rb +0 -107
- data/lib/sidekiq/throttled/middleware.rb +0 -22
- data/lib/sidekiq/throttled/patches/queue.rb +0 -18
- data/lib/sidekiq/throttled/queue_name.rb +0 -46
- data/lib/sidekiq/throttled/queues_pauser.rb +0 -152
- data/lib/sidekiq/throttled/testing.rb +0 -12
- data/lib/sidekiq/throttled/utils.rb +0 -19
- data/lib/sidekiq/throttled/web/queues.html.erb +0 -49
- data/lib/sidekiq/throttled/web/summary_fix.js +0 -10
- data/lib/sidekiq/throttled/web/summary_fix.rb +0 -35
- data/rubocop/layout.yml +0 -24
- data/rubocop/lint.yml +0 -41
- data/rubocop/metrics.yml +0 -4
- data/rubocop/performance.yml +0 -25
- data/rubocop/rspec.yml +0 -3
- data/rubocop/style.yml +0 -84
- data/sidekiq-throttled.gemspec +0 -36
- /data/{LICENSE.md → LICENSE.txt} +0 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sidekiq
|
4
|
+
module Throttled
|
5
|
+
module Patches
|
6
|
+
module ThrottledRetriever
|
7
|
+
# Retrieves job from redis.
|
8
|
+
#
|
9
|
+
# @return [Sidekiq::BasicFetch::UnitOfWork, nil]
|
10
|
+
def retrieve_work
|
11
|
+
work = super
|
12
|
+
|
13
|
+
if work && Throttled.throttled?(work.job)
|
14
|
+
Throttled.cooldown&.notify_throttled(work.queue)
|
15
|
+
requeue_throttled(work)
|
16
|
+
return nil
|
17
|
+
end
|
18
|
+
|
19
|
+
Throttled.cooldown&.notify_admitted(work.queue) if work
|
20
|
+
|
21
|
+
work
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# internal
|
4
|
-
|
5
|
-
require "sidekiq/throttled/utils"
|
4
|
+
require_relative "./strategy"
|
6
5
|
|
7
6
|
module Sidekiq
|
8
7
|
module Throttled
|
@@ -14,8 +13,6 @@ module Sidekiq
|
|
14
13
|
@aliases = {}
|
15
14
|
|
16
15
|
class << self
|
17
|
-
include Utils
|
18
|
-
|
19
16
|
# Adds strategy to the registry.
|
20
17
|
#
|
21
18
|
# @param (see Strategy#initialize)
|
@@ -105,9 +102,7 @@ module Sidekiq
|
|
105
102
|
# @param name [Class, #to_s]
|
106
103
|
# @return [Strategy, nil]
|
107
104
|
def find_by_class(name)
|
108
|
-
|
109
|
-
|
110
|
-
const = name.is_a?(Class) ? name : constantize(name)
|
105
|
+
const = name.is_a?(Class) ? name : Object.const_get(name)
|
111
106
|
return unless const.is_a?(Class)
|
112
107
|
|
113
108
|
const.ancestors.each do |m|
|
@@ -115,6 +110,8 @@ module Sidekiq
|
|
115
110
|
return strategy if strategy
|
116
111
|
end
|
117
112
|
|
113
|
+
nil
|
114
|
+
rescue NameError
|
118
115
|
nil
|
119
116
|
end
|
120
117
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "redis_prescription"
|
4
4
|
|
5
|
-
|
5
|
+
require_relative "./base"
|
6
6
|
|
7
7
|
module Sidekiq
|
8
8
|
module Throttled
|
@@ -20,7 +20,7 @@ module Sidekiq
|
|
20
20
|
# PUSH(@key, @jid)
|
21
21
|
# return 0
|
22
22
|
# end
|
23
|
-
SCRIPT =
|
23
|
+
SCRIPT = RedisPrescription.new(File.read("#{__dir__}/concurrency.lua"))
|
24
24
|
private_constant :SCRIPT
|
25
25
|
|
26
26
|
# @param [#to_s] strategy_key
|
@@ -49,9 +49,7 @@ module Sidekiq
|
|
49
49
|
keys = [key(job_args)]
|
50
50
|
argv = [jid.to_s, job_limit, @ttl, Time.now.to_f]
|
51
51
|
|
52
|
-
Sidekiq.redis
|
53
|
-
1 == SCRIPT.eval(redis, :keys => keys, :argv => argv)
|
54
|
-
end
|
52
|
+
Sidekiq.redis { |redis| 1 == SCRIPT.call(redis, keys: keys, argv: argv) }
|
55
53
|
end
|
56
54
|
|
57
55
|
# @return [Integer] Current count of jobs
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "redis_prescription"
|
4
4
|
|
5
|
-
|
5
|
+
require_relative "./base"
|
6
6
|
|
7
7
|
module Sidekiq
|
8
8
|
module Throttled
|
@@ -30,7 +30,7 @@ module Sidekiq
|
|
30
30
|
#
|
31
31
|
# increase!
|
32
32
|
# return 0
|
33
|
-
SCRIPT =
|
33
|
+
SCRIPT = RedisPrescription.new(File.read("#{__dir__}/threshold.lua"))
|
34
34
|
private_constant :SCRIPT
|
35
35
|
|
36
36
|
# @param [#to_s] strategy_key
|
@@ -66,9 +66,7 @@ module Sidekiq
|
|
66
66
|
keys = [key(job_args)]
|
67
67
|
argv = [job_limit, period(job_args), Time.now.to_f]
|
68
68
|
|
69
|
-
Sidekiq.redis
|
70
|
-
1 == SCRIPT.eval(redis, :keys => keys, :argv => argv)
|
71
|
-
end
|
69
|
+
Sidekiq.redis { |redis| 1 == SCRIPT.call(redis, keys: keys, argv: argv) }
|
72
70
|
end
|
73
71
|
|
74
72
|
# @return [Integer] Current count of jobs
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# internal
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
require_relative "./errors"
|
5
|
+
require_relative "./strategy_collection"
|
6
|
+
require_relative "./strategy/concurrency"
|
7
|
+
require_relative "./strategy/threshold"
|
8
8
|
|
9
9
|
module Sidekiq
|
10
10
|
module Throttled
|
@@ -35,14 +35,14 @@ module Sidekiq
|
|
35
35
|
@observer = observer
|
36
36
|
|
37
37
|
@concurrency = StrategyCollection.new(concurrency,
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
38
|
+
strategy: Concurrency,
|
39
|
+
name: name,
|
40
|
+
key_suffix: key_suffix)
|
41
41
|
|
42
42
|
@threshold = StrategyCollection.new(threshold,
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
43
|
+
strategy: Threshold,
|
44
|
+
name: name,
|
45
|
+
key_suffix: key_suffix)
|
46
46
|
|
47
47
|
return if @concurrency.any? || @threshold.any?
|
48
48
|
|
@@ -19,16 +19,15 @@ module Sidekiq
|
|
19
19
|
# @param [#to_s] name
|
20
20
|
# @param [#call] key_suffix Dynamic key suffix generator.
|
21
21
|
def initialize(strategies, strategy:, name:, key_suffix:)
|
22
|
-
strategies = (strategies.is_a?(Hash) ? [strategies] : Array(strategies))
|
23
|
-
@strategies = strategies.map do |options|
|
22
|
+
@strategies = (strategies.is_a?(Hash) ? [strategies] : Array(strategies)).map do |options|
|
24
23
|
make_strategy(strategy, name, key_suffix, options)
|
25
24
|
end
|
26
25
|
end
|
27
26
|
|
28
27
|
# @param [#call] block
|
29
28
|
# Iterates each strategy in collection
|
30
|
-
def each(
|
31
|
-
@strategies.each(
|
29
|
+
def each(...)
|
30
|
+
@strategies.each(...)
|
32
31
|
end
|
33
32
|
|
34
33
|
# @return [Boolean] whenever any strategy in collection has dynamic config
|
@@ -38,14 +37,14 @@ module Sidekiq
|
|
38
37
|
|
39
38
|
# @return [Boolean] whenever job is throttled or not
|
40
39
|
# by any strategy in collection.
|
41
|
-
def throttled?(
|
42
|
-
any? { |s| s.throttled?(
|
40
|
+
def throttled?(...)
|
41
|
+
any? { |s| s.throttled?(...) }
|
43
42
|
end
|
44
43
|
|
45
44
|
# Marks job as being processed.
|
46
45
|
# @return [void]
|
47
|
-
def finalize!(
|
48
|
-
each { |c| c.finalize!(
|
46
|
+
def finalize!(...)
|
47
|
+
each { |c| c.finalize!(...) }
|
49
48
|
end
|
50
49
|
|
51
50
|
# Resets count of jobs of all avaliable strategies
|
@@ -61,7 +60,7 @@ module Sidekiq
|
|
61
60
|
return unless options
|
62
61
|
|
63
62
|
strategy.new("throttled:#{name}",
|
64
|
-
:
|
63
|
+
key_suffix: key_suffix,
|
65
64
|
**options)
|
66
65
|
end
|
67
66
|
end
|
@@ -8,9 +8,8 @@ require "sidekiq"
|
|
8
8
|
require "sidekiq/web"
|
9
9
|
|
10
10
|
# internal
|
11
|
-
|
12
|
-
|
13
|
-
require "sidekiq/throttled/web/summary_fix"
|
11
|
+
require_relative "./registry"
|
12
|
+
require_relative "./web/stats"
|
14
13
|
|
15
14
|
module Sidekiq
|
16
15
|
module Throttled
|
@@ -18,31 +17,11 @@ module Sidekiq
|
|
18
17
|
module Web
|
19
18
|
VIEWS = Pathname.new(__dir__).join("web")
|
20
19
|
THROTTLED_TPL = VIEWS.join("throttled.html.erb").read.freeze
|
21
|
-
QUEUES_TPL = VIEWS.join("queues.html.erb").read.freeze
|
22
20
|
|
23
21
|
class << self
|
24
|
-
# Replace default Queues tab with enhanced one.
|
25
|
-
def enhance_queues_tab!
|
26
|
-
SummaryFix.enabled = true
|
27
|
-
Sidekiq::Web::DEFAULT_TABS["Queues"] = "enhanced-queues"
|
28
|
-
Sidekiq::Web.tabs.delete("Enhanced Queues")
|
29
|
-
end
|
30
|
-
|
31
|
-
# Restore original Queues tab.
|
32
|
-
#
|
33
|
-
# @api There's next to absolutely no value in this method for real
|
34
|
-
# users. The only it's purpose is to restore virgin state in specs.
|
35
|
-
def restore_queues_tab!
|
36
|
-
SummaryFix.enabled = false
|
37
|
-
Sidekiq::Web::DEFAULT_TABS["Queues"] = "queues"
|
38
|
-
Sidekiq::Web.tabs["Enhanced Queues"] = "enhanced-queues"
|
39
|
-
end
|
40
|
-
|
41
22
|
# @api private
|
42
23
|
def registered(app)
|
43
|
-
SummaryFix.apply! app
|
44
24
|
register_throttled_tab app
|
45
|
-
register_enhanced_queues_tab app
|
46
25
|
end
|
47
26
|
|
48
27
|
private
|
@@ -55,27 +34,6 @@ module Sidekiq
|
|
55
34
|
redirect "#{root_path}throttled"
|
56
35
|
end
|
57
36
|
end
|
58
|
-
|
59
|
-
# rubocop:disable Metrics/AbcSize
|
60
|
-
def register_enhanced_queues_tab(app) # rubocop:disable Metrics/MethodLength
|
61
|
-
pauser = QueuesPauser.instance
|
62
|
-
|
63
|
-
app.get("/enhanced-queues") do
|
64
|
-
@queues = Sidekiq::Queue.all
|
65
|
-
erb QUEUES_TPL.dup
|
66
|
-
end
|
67
|
-
|
68
|
-
app.post("/enhanced-queues/:name") do
|
69
|
-
case params[:action]
|
70
|
-
when "delete" then Sidekiq::Queue.new(params[:name]).clear
|
71
|
-
when "pause" then pauser.pause!(params[:name])
|
72
|
-
else pauser.resume!(params[:name])
|
73
|
-
end
|
74
|
-
|
75
|
-
redirect "#{root_path}enhanced-queues"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
# rubocop:enable Metrics/AbcSize
|
79
37
|
end
|
80
38
|
end
|
81
39
|
end
|
@@ -83,4 +41,3 @@ end
|
|
83
41
|
|
84
42
|
Sidekiq::Web.register Sidekiq::Throttled::Web
|
85
43
|
Sidekiq::Web.tabs["Throttled"] = "throttled"
|
86
|
-
Sidekiq::Web.tabs["Enhanced Queues"] = "enhanced-queues"
|
data/lib/sidekiq/throttled.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# 3rd party
|
4
3
|
require "sidekiq"
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
require_relative "./throttled/config"
|
6
|
+
require_relative "./throttled/cooldown"
|
7
|
+
require_relative "./throttled/job"
|
8
|
+
require_relative "./throttled/message"
|
9
|
+
require_relative "./throttled/middlewares/server"
|
10
|
+
require_relative "./throttled/patches/basic_fetch"
|
11
|
+
require_relative "./throttled/patches/super_fetch"
|
12
|
+
require_relative "./throttled/registry"
|
13
|
+
require_relative "./throttled/version"
|
14
|
+
require_relative "./throttled/worker"
|
15
15
|
|
16
16
|
# @see https://github.com/mperham/sidekiq/
|
17
17
|
module Sidekiq
|
@@ -20,7 +20,6 @@ module Sidekiq
|
|
20
20
|
# Just add somewhere in your bootstrap:
|
21
21
|
#
|
22
22
|
# require "sidekiq/throttled"
|
23
|
-
# Sidekiq::Throttled.setup!
|
24
23
|
#
|
25
24
|
# Once you've done that you can include {Sidekiq::Throttled::Job} to your
|
26
25
|
# job classes and configure throttling:
|
@@ -46,28 +45,29 @@ module Sidekiq
|
|
46
45
|
MUTEX = Mutex.new
|
47
46
|
private_constant :MUTEX
|
48
47
|
|
49
|
-
|
50
|
-
|
48
|
+
@config = Config.new.freeze
|
49
|
+
@cooldown = Cooldown[@config]
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
class << self
|
52
|
+
# @api internal
|
53
|
+
#
|
54
|
+
# @return [Cooldown, nil]
|
55
|
+
attr_reader :cooldown
|
56
56
|
|
57
|
-
#
|
57
|
+
# @example
|
58
|
+
# Sidekiq::Throttled.configure do |config|
|
59
|
+
# config.cooldown_period = nil # Disable queues cooldown manager
|
60
|
+
# end
|
58
61
|
#
|
59
|
-
# @
|
60
|
-
def
|
61
|
-
|
62
|
-
|
62
|
+
# @yieldparam config [Config]
|
63
|
+
def configure
|
64
|
+
MUTEX.synchronize do
|
65
|
+
config = @config.dup
|
63
66
|
|
64
|
-
|
65
|
-
setup_strategy!(config)
|
67
|
+
yield config
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
-
chain.add Sidekiq::Throttled::Middleware
|
70
|
-
end
|
69
|
+
@config = config.freeze
|
70
|
+
@cooldown = Cooldown[@config]
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -76,56 +76,35 @@ module Sidekiq
|
|
76
76
|
# @param [String] message Job's JSON payload
|
77
77
|
# @return [Boolean]
|
78
78
|
def throttled?(message)
|
79
|
-
message =
|
80
|
-
|
81
|
-
jid = message.fetch("jid") { return false }
|
79
|
+
message = Message.new(message)
|
80
|
+
return false unless message.job_class && message.job_id
|
82
81
|
|
83
|
-
|
84
|
-
|
85
|
-
Registry.get job do |strategy|
|
86
|
-
return strategy.throttled?(jid, *message["args"])
|
82
|
+
Registry.get(message.job_class) do |strategy|
|
83
|
+
return strategy.throttled?(message.job_id, *message.job_args)
|
87
84
|
end
|
88
85
|
|
89
86
|
false
|
90
|
-
rescue
|
87
|
+
rescue StandardError
|
91
88
|
false
|
92
89
|
end
|
93
90
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
def setup_strategy!(sidekiq_config)
|
98
|
-
require "sidekiq/throttled/fetch"
|
99
|
-
|
100
|
-
sidekiq_version = Gem::Version.new(Sidekiq::VERSION)
|
101
|
-
|
102
|
-
# https://github.com/mperham/sidekiq/commit/67daa7a408b214d593100f782271ed108686c147
|
103
|
-
sidekiq_config = sidekiq_config.options if sidekiq_version < Gem::Version.new("6.5.0")
|
91
|
+
# @deprecated Will be removed in 2.0.0
|
92
|
+
def setup!
|
93
|
+
warn "Sidekiq::Throttled.setup! was deprecated"
|
104
94
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
Sidekiq::Throttled::
|
109
|
-
else
|
110
|
-
Sidekiq::Throttled::Fetch.new(sidekiq_config)
|
95
|
+
Sidekiq.configure_server do |config|
|
96
|
+
config.server_middleware do |chain|
|
97
|
+
chain.remove(Sidekiq::Throttled::Middlewares::Server)
|
98
|
+
chain.add(Sidekiq::Throttled::Middlewares::Server)
|
111
99
|
end
|
112
|
-
end
|
113
|
-
|
114
|
-
# Tries to preload constant by it's name once.
|
115
|
-
#
|
116
|
-
# Somehow, sometimes, some classes are not eager loaded upon Rails init,
|
117
|
-
# leading to throttling config not being registered prior job perform.
|
118
|
-
# And that leaves us with concurrency limit + 1 situation upon Sidekiq
|
119
|
-
# server restart (becomes normal after all Sidekiq processes handled
|
120
|
-
# at leas onr job of that class).
|
121
|
-
#
|
122
|
-
# @return [void]
|
123
|
-
def preload_constant!(job)
|
124
|
-
MUTEX.synchronize do
|
125
|
-
@preloaded ||= {}
|
126
|
-
@preloaded[job] ||= constantize(job) || true
|
127
100
|
end
|
128
101
|
end
|
129
102
|
end
|
130
103
|
end
|
104
|
+
|
105
|
+
configure_server do |config|
|
106
|
+
config.server_middleware do |chain|
|
107
|
+
chain.add(Sidekiq::Throttled::Middlewares::Server)
|
108
|
+
end
|
109
|
+
end
|
131
110
|
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:
|
4
|
+
version: 1.4.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:
|
11
|
+
date: 2024-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -16,100 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
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: '
|
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: '
|
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
|
-
version: '
|
47
|
+
version: '6.5'
|
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: '
|
55
|
-
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.0'
|
69
|
-
description: Concurrency and threshold throttling for Sidekiq.
|
54
|
+
version: '6.5'
|
55
|
+
description:
|
70
56
|
email:
|
71
57
|
- alexey@zapparov.com
|
72
58
|
executables: []
|
73
59
|
extensions: []
|
74
60
|
extra_rdoc_files: []
|
75
61
|
files:
|
76
|
-
-
|
77
|
-
-
|
78
|
-
- ".github/workflows/ci.yml"
|
79
|
-
- ".gitignore"
|
80
|
-
- ".rspec"
|
81
|
-
- ".rubocop.yml"
|
82
|
-
- ".rubocop_todo.yml"
|
83
|
-
- ".travis.yml"
|
84
|
-
- ".yardopts"
|
85
|
-
- Appraisals
|
86
|
-
- CHANGES.md
|
87
|
-
- Gemfile
|
88
|
-
- Guardfile
|
89
|
-
- LICENSE.md
|
90
|
-
- README.md
|
91
|
-
- Rakefile
|
92
|
-
- gemfiles/sidekiq_6.0.gemfile
|
93
|
-
- gemfiles/sidekiq_6.1.gemfile
|
94
|
-
- gemfiles/sidekiq_6.2.gemfile
|
95
|
-
- gemfiles/sidekiq_6.3.gemfile
|
96
|
-
- gemfiles/sidekiq_6.4.gemfile
|
97
|
-
- gemfiles/sidekiq_6.5.gemfile
|
62
|
+
- LICENSE.txt
|
63
|
+
- README.adoc
|
98
64
|
- lib/sidekiq/throttled.rb
|
99
|
-
- lib/sidekiq/throttled/
|
100
|
-
- lib/sidekiq/throttled/
|
101
|
-
- lib/sidekiq/throttled/communicator/exception_handler.rb
|
102
|
-
- lib/sidekiq/throttled/communicator/listener.rb
|
103
|
-
- lib/sidekiq/throttled/configuration.rb
|
65
|
+
- lib/sidekiq/throttled/config.rb
|
66
|
+
- lib/sidekiq/throttled/cooldown.rb
|
104
67
|
- lib/sidekiq/throttled/errors.rb
|
105
|
-
- lib/sidekiq/throttled/
|
106
|
-
- lib/sidekiq/throttled/fetch.rb
|
107
|
-
- lib/sidekiq/throttled/fetch/unit_of_work.rb
|
68
|
+
- lib/sidekiq/throttled/expirable_set.rb
|
108
69
|
- lib/sidekiq/throttled/job.rb
|
109
|
-
- lib/sidekiq/throttled/
|
110
|
-
- lib/sidekiq/throttled/
|
111
|
-
- lib/sidekiq/throttled/
|
112
|
-
- lib/sidekiq/throttled/
|
70
|
+
- lib/sidekiq/throttled/message.rb
|
71
|
+
- lib/sidekiq/throttled/middlewares/server.rb
|
72
|
+
- lib/sidekiq/throttled/patches/basic_fetch.rb
|
73
|
+
- lib/sidekiq/throttled/patches/super_fetch.rb
|
74
|
+
- lib/sidekiq/throttled/patches/throttled_retriever.rb
|
113
75
|
- lib/sidekiq/throttled/registry.rb
|
114
76
|
- lib/sidekiq/throttled/strategy.rb
|
115
77
|
- lib/sidekiq/throttled/strategy/base.rb
|
@@ -118,27 +80,19 @@ files:
|
|
118
80
|
- lib/sidekiq/throttled/strategy/threshold.lua
|
119
81
|
- lib/sidekiq/throttled/strategy/threshold.rb
|
120
82
|
- lib/sidekiq/throttled/strategy_collection.rb
|
121
|
-
- lib/sidekiq/throttled/testing.rb
|
122
|
-
- lib/sidekiq/throttled/utils.rb
|
123
83
|
- lib/sidekiq/throttled/version.rb
|
124
84
|
- lib/sidekiq/throttled/web.rb
|
125
|
-
- lib/sidekiq/throttled/web/queues.html.erb
|
126
85
|
- lib/sidekiq/throttled/web/stats.rb
|
127
|
-
- lib/sidekiq/throttled/web/summary_fix.js
|
128
|
-
- lib/sidekiq/throttled/web/summary_fix.rb
|
129
86
|
- lib/sidekiq/throttled/web/throttled.html.erb
|
130
87
|
- lib/sidekiq/throttled/worker.rb
|
131
|
-
- rubocop/layout.yml
|
132
|
-
- rubocop/lint.yml
|
133
|
-
- rubocop/metrics.yml
|
134
|
-
- rubocop/performance.yml
|
135
|
-
- rubocop/rspec.yml
|
136
|
-
- rubocop/style.yml
|
137
|
-
- sidekiq-throttled.gemspec
|
138
88
|
homepage: https://github.com/ixti/sidekiq-throttled
|
139
89
|
licenses:
|
140
90
|
- MIT
|
141
91
|
metadata:
|
92
|
+
homepage_uri: https://github.com/ixti/sidekiq-throttled
|
93
|
+
source_code_uri: https://github.com/ixti/sidekiq-throttled/tree/v1.4.0
|
94
|
+
bug_tracker_uri: https://github.com/ixti/sidekiq-throttled/issues
|
95
|
+
changelog_uri: https://github.com/ixti/sidekiq-throttled/blob/v1.4.0/CHANGES.md
|
142
96
|
rubygems_mfa_required: 'true'
|
143
97
|
post_install_message:
|
144
98
|
rdoc_options: []
|
@@ -155,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
109
|
- !ruby/object:Gem::Version
|
156
110
|
version: '0'
|
157
111
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
112
|
+
rubygems_version: 3.5.4
|
159
113
|
signing_key:
|
160
114
|
specification_version: 4
|
161
|
-
summary: Concurrency and
|
115
|
+
summary: Concurrency and rate-limit throttling for Sidekiq
|
162
116
|
test_files: []
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.github/dependabot.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
2
|
-
|
3
|
-
version: 2
|
4
|
-
updates:
|
5
|
-
- package-ecosystem: "github-actions"
|
6
|
-
directory: "/"
|
7
|
-
schedule:
|
8
|
-
interval: "daily"
|
9
|
-
- package-ecosystem: "bundler"
|
10
|
-
directory: "/"
|
11
|
-
schedule:
|
12
|
-
interval: "daily"
|