job-iteration 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86ee54cb82b9d6c5e1b97b9bf2e01eed332ce87c
4
- data.tar.gz: f05e54ca8459b37f472bfcd4f9cf47d9a005dc8b
3
+ metadata.gz: ad408d4be3681757ec2dbe9c530938610f3802fd
4
+ data.tar.gz: 9166829abfa92b0f552971a45ec7be86073664fe
5
5
  SHA512:
6
- metadata.gz: aabb890775e006f0097bb886fddd6c9bdbeb442616e5fbb0c12d96ad8fe453ca1119ac1018cab36b9756188a0ccd28944a3e836032b1099a899f54b078c7ba64
7
- data.tar.gz: 5133e2eff873e88d009aa255d3eb01bde85b589e24e9f1f660dbe60f15022c24585dded574b3a397ff8fb503dc97fda55b13f1ad24be5fadd1917a94c474c564
6
+ metadata.gz: 1c2bf184cc6f7a643d0bd50de0d83b9eeb3f36998b97f05628a892bda4ad15234d45c8f369a5d9969239924821f98b19f55e2289f55dcf442d07a76ef84e3d5f
7
+ data.tar.gz: 96f245daa9313d4adbde345cbc7bd298cf7ca9946bb481d5a98e8de0390293c584e0e6b4c2d8e5f1e126572b32780b60b43c938ae04c18e42cb0f19219fe0835
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- job-iteration (0.9.2)
4
+ job-iteration (0.9.3)
5
5
  activejob (~> 5.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  The job would run fairly quickly when you only have a hundred `User` records. But as the number of records grows, it will take longer for a job to iterate over all Users. Eventually, there will be millions of records to iterate and the job will end up taking hours or even days.
22
22
 
23
- With frequent deploys and worker restarts, it would mean that a job will be either lost of started from the beginning. Some records (especially those in the beginning of the relation) will be processed more than once.
23
+ With frequent deploys and worker restarts, it would mean that a job will be either lost or restarted from the beginning. Some records (especially those in the beginning of the relation) will be processed more than once.
24
24
 
25
25
  Cloud environments are also unpredictable, and there's no way to guarantee that a single job will have reserved hardware to run for hours and days. What if AWS diagnosed the instance as unhealthy and will restart it in 5 minutes? What if a Kubernetes pod is getting [evicted](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/)? Again, all job progress will be lost. At Shopify, we also use it to interrupt workloads safely when moving tenants between shards and move shards between regions.
26
26
 
@@ -44,9 +44,9 @@ module JobIteration
44
44
 
45
45
  private
46
46
 
47
- def stub_shutdown_adapter_to_return(_value)
47
+ def stub_shutdown_adapter_to_return(value)
48
48
  adapter = mock
49
- adapter.stubs(:call).returns(false)
49
+ adapter.stubs(:call).returns(value)
50
50
  JobIteration.stubs(:interruption_adapter).returns(adapter)
51
51
  end
52
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JobIteration
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.3"
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: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-23 00:00:00.000000000 Z
11
+ date: 2018-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob