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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b36e89b6fb57143e002ec9185093367f97b1e8db3b4e585ef2a5ca25a147008
4
- data.tar.gz: 616a27066510613ce74de5cd76d9920188006377fbcfb2b56b1fdd8d045ba1a6
3
+ metadata.gz: 8788b6f2da0dba53c31c57d529a371e3e822091caa3654bcafc6cf25ad031adb
4
+ data.tar.gz: 14cba8e6969be4d6aba0f729abd355196324f2eebd00d9b659053b7efe25117d
5
5
  SHA512:
6
- metadata.gz: 643cd18e4ed677c44bb5e709f286ffd20bd93602064967fa28cbf5db865290da7b4ada2619103ae3f34f9b8e6048684c652465e72d34513526515953dc1b1401
7
- data.tar.gz: cdec5872bfd3096782ff954434c0ffaa723c9e7abf3d3136d8eb9e5486be20b067133cc9b5fcc162a5e460f38e80290036b67c4a6710779ed34410e99fb33996
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.0)
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.4.0)
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.9158)
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
- @enum.each do |*val|
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(*val)
38
+ yielder.yield(*@enum.next_values)
39
39
  end
40
40
  end
41
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JobIteration
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.1"
5
5
  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.0
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-10-08 00:00:00.000000000 Z
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord