job-iteration 1.3.0 → 1.3.1
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +3 -3
- data/lib/job-iteration/throttle_enumerator.rb +2 -2
- data/lib/job-iteration/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8788b6f2da0dba53c31c57d529a371e3e822091caa3654bcafc6cf25ad031adb
|
|
4
|
+
data.tar.gz: 14cba8e6969be4d6aba0f729abd355196324f2eebd00d9b659053b7efe25117d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97f3d383f9eb1e82c3c68ee21bdcaf31a5df2923ebd4eb9089b7b78348f64bd69aa0da39acd0eba23cd309263931639e4e6ca702511a0d83a9528e520ff77e89
|
|
7
|
+
data.tar.gz: beda68f91cfd51d0d78c2b0c26b20b70bc339fc25591d3ceefe825e687bdc057b448832d2abead1e80c5259eda52ef04d6b6cf83063431766ab8920dd753c396
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
### Master (unreleased)
|
|
2
2
|
|
|
3
|
+
## v1.3.1 (Nov 11, 2021)
|
|
4
|
+
- [87](https://github.com/Shopify/job-iteration/pull/87) - Do not evaluate enumerator when throttled
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
## v1.3.0 (Oct 7, 2021)
|
|
4
8
|
- [133](https://github.com/Shopify/job-iteration/pull/133) - Moves attributes out of JobIteration::Iteration included block
|
|
5
9
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
job-iteration (1.3.
|
|
4
|
+
job-iteration (1.3.1)
|
|
5
5
|
activejob (>= 5.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -54,7 +54,7 @@ GEM
|
|
|
54
54
|
rack
|
|
55
55
|
rainbow (3.0.0)
|
|
56
56
|
rake (13.0.6)
|
|
57
|
-
redis (4.
|
|
57
|
+
redis (4.5.1)
|
|
58
58
|
redis-namespace (1.8.1)
|
|
59
59
|
redis (>= 3.0.4)
|
|
60
60
|
regexp_parser (2.1.1)
|
|
@@ -89,7 +89,7 @@ GEM
|
|
|
89
89
|
rack (~> 2.2)
|
|
90
90
|
rack-protection (= 2.1.0)
|
|
91
91
|
tilt (~> 2.0)
|
|
92
|
-
sorbet-runtime (0.5.
|
|
92
|
+
sorbet-runtime (0.5.9219)
|
|
93
93
|
tilt (2.0.10)
|
|
94
94
|
tzinfo (2.0.4)
|
|
95
95
|
concurrent-ruby (~> 1.0)
|
|
@@ -28,14 +28,14 @@ module JobIteration
|
|
|
28
28
|
|
|
29
29
|
def to_enum
|
|
30
30
|
Enumerator.new(-> { @enum.size }) do |yielder|
|
|
31
|
-
|
|
31
|
+
loop do
|
|
32
32
|
if should_throttle?
|
|
33
33
|
ActiveSupport::Notifications.instrument("throttled.iteration", job_class: @job.class.name)
|
|
34
34
|
@job.retry_job(wait: @backoff)
|
|
35
35
|
throw(:abort, :skip_complete_callbacks)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
yielder.yield(
|
|
38
|
+
yielder.yield(*@enum.next_values)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: job-iteration
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|