sidekiq-throttled 1.1.0 → 1.2.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 +31 -23
- data/lib/sidekiq/throttled/strategy/base.rb +1 -1
- data/lib/sidekiq/throttled/version.rb +1 -1
- data/lib/sidekiq/throttled.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a187d7a0ab7f55794f909da549082fb32ec06acca0e75928fa970fd2312a63e
|
4
|
+
data.tar.gz: c6acd8c1ebe40741e0285e6de82c0384b60a7a03ccee602b8de29309cb8bc313
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f777dff16dc389b43a089c4e392228afc695830bea0bedb4a4aa4b04d49b44a0ae5b60d643a255548947f90eeb198aaf91219f9f282de29b8c7c009626e6e4f
|
7
|
+
data.tar.gz: 86b28f4fa073f7930254269e766576da4bf3412a262d9e0329285221b1376437dc6f072e9aa93be1402da7e06f3f5501ce416b241d134c666546ae3abb7397fe
|
data/README.adoc
CHANGED
@@ -12,11 +12,7 @@
|
|
12
12
|
{doc-link}[image:{doc-badge}[API Documentation]]
|
13
13
|
****
|
14
14
|
|
15
|
-
|
16
|
-
see: https://github.com/ixti/sidekiq-throttled/tree/0-x-stable[0-x-stable]
|
17
|
-
|
18
|
-
Concurrency and threshold throttling for https://github.com/mperham/sidekiq[Sidekiq].
|
19
|
-
|
15
|
+
Concurrency and threshold throttling for https://github.com/sidekiq/sidekiq[Sidekiq].
|
20
16
|
|
21
17
|
== Installation
|
22
18
|
|
@@ -85,7 +81,26 @@ end
|
|
85
81
|
----
|
86
82
|
|
87
83
|
|
88
|
-
===
|
84
|
+
=== Configuration
|
85
|
+
|
86
|
+
[source,ruby]
|
87
|
+
----
|
88
|
+
Sidekiq::Throttled.configure do |config|
|
89
|
+
# Period in seconds to exclude queue from polling in case it returned
|
90
|
+
# {config.cooldown_threshold} amount of throttled jobs in a row. Set
|
91
|
+
# this value to `nil` to disable cooldown manager completely.
|
92
|
+
# Default: 2.0
|
93
|
+
config.cooldown_period = 2.0
|
94
|
+
|
95
|
+
# Exclude queue from polling after it returned given amount of throttled
|
96
|
+
# jobs in a row.
|
97
|
+
# Default: 1 (cooldown after first throttled job)
|
98
|
+
config.cooldown_threshold = 1
|
99
|
+
end
|
100
|
+
----
|
101
|
+
|
102
|
+
|
103
|
+
==== Middleware(s)
|
89
104
|
|
90
105
|
`Sidekiq::Throttled` relies on following bundled middlewares:
|
91
106
|
|
@@ -106,23 +121,7 @@ Sidekiq.configure_server do |config|
|
|
106
121
|
end
|
107
122
|
----
|
108
123
|
|
109
|
-
|
110
|
-
|
111
|
-
[source,ruby]
|
112
|
-
----
|
113
|
-
Sidekiq::Throttled.configure do |config|
|
114
|
-
# Period in seconds to exclude queue from polling in case it returned
|
115
|
-
# {config.cooldown_threshold} amount of throttled jobs in a row. Set
|
116
|
-
# this value to `nil` to disable cooldown manager completely.
|
117
|
-
# Default: 2.0
|
118
|
-
config.cooldown_period = 2.0
|
119
|
-
|
120
|
-
# Exclude queue from polling after it returned given amount of throttled
|
121
|
-
# jobs in a row.
|
122
|
-
# Default: 1 (cooldown after first throttled job)
|
123
|
-
config.cooldown_threshold = 1
|
124
|
-
end
|
125
|
-
----
|
124
|
+
See: https://github.com/sidekiq/sidekiq/blob/main/lib/sidekiq/middleware/chain.rb
|
126
125
|
|
127
126
|
|
128
127
|
=== Observer
|
@@ -268,6 +267,7 @@ sidekiq_throttle(concurrency: { limit: 20, ttl: 1.hour.to_i })
|
|
268
267
|
|
269
268
|
This library aims to support and is tested against the following Ruby versions:
|
270
269
|
|
270
|
+
* Ruby 2.7.x
|
271
271
|
* Ruby 3.0.x
|
272
272
|
* Ruby 3.1.x
|
273
273
|
* Ruby 3.2.x
|
@@ -312,3 +312,11 @@ This library aims to support and work with following Sidekiq versions:
|
|
312
312
|
* Send a pull request
|
313
313
|
* If we like them we'll merge them
|
314
314
|
* If we've accepted a patch, feel free to ask for commit access!
|
315
|
+
|
316
|
+
|
317
|
+
== Endorsement
|
318
|
+
|
319
|
+
https://github.com/sensortower[image:sensortower.svg[SensorTower]]
|
320
|
+
|
321
|
+
The initial work on the project was initiated to address the needs of
|
322
|
+
https://github.com/sensortower[SensorTower].
|
data/lib/sidekiq/throttled.rb
CHANGED
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: 1.
|
4
|
+
version: 1.2.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: 2023-
|
11
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -87,9 +87,9 @@ licenses:
|
|
87
87
|
- MIT
|
88
88
|
metadata:
|
89
89
|
homepage_uri: https://github.com/ixti/sidekiq-throttled
|
90
|
-
source_code_uri: https://github.com/ixti/sidekiq-throttled/tree/v1.
|
90
|
+
source_code_uri: https://github.com/ixti/sidekiq-throttled/tree/v1.2.0
|
91
91
|
bug_tracker_uri: https://github.com/ixti/sidekiq-throttled/issues
|
92
|
-
changelog_uri: https://github.com/ixti/sidekiq-throttled/blob/v1.
|
92
|
+
changelog_uri: https://github.com/ixti/sidekiq-throttled/blob/v1.2.0/CHANGES.md
|
93
93
|
rubygems_mfa_required: 'true'
|
94
94
|
post_install_message:
|
95
95
|
rdoc_options: []
|
@@ -99,14 +99,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '2.7'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
105
|
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
|
-
rubygems_version: 3.
|
109
|
+
rubygems_version: 3.3.26
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Concurrency and rate-limit throttling for Sidekiq
|