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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/job-iteration/test_helper.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad408d4be3681757ec2dbe9c530938610f3802fd
|
4
|
+
data.tar.gz: 9166829abfa92b0f552971a45ec7be86073664fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c2bf184cc6f7a643d0bd50de0d83b9eeb3f36998b97f05628a892bda4ad15234d45c8f369a5d9969239924821f98b19f55e2289f55dcf442d07a76ef84e3d5f
|
7
|
+
data.tar.gz: 96f245daa9313d4adbde345cbc7bd298cf7ca9946bb481d5a98e8de0390293c584e0e6b4c2d8e5f1e126572b32780b60b43c938ae04c18e42cb0f19219fe0835
|
data/Gemfile.lock
CHANGED
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
|
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(
|
47
|
+
def stub_shutdown_adapter_to_return(value)
|
48
48
|
adapter = mock
|
49
|
-
adapter.stubs(:call).returns(
|
49
|
+
adapter.stubs(:call).returns(value)
|
50
50
|
JobIteration.stubs(:interruption_adapter).returns(adapter)
|
51
51
|
end
|
52
52
|
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.
|
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-
|
11
|
+
date: 2018-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|