elastic_whenever 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +4 -2
- data/CHANGELOG.md +10 -0
- data/elastic_whenever.gemspec +2 -1
- data/lib/elastic_whenever.rb +1 -0
- data/lib/elastic_whenever/cli.rb +19 -2
- data/lib/elastic_whenever/version.rb +1 -1
- metadata +19 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b3f6314849f075346152b2b861572f3d6cc9830044c7410a9dcbfdca08c13ecc
|
4
|
+
data.tar.gz: db5b26247b18515ba576853fbdb826872b0ba7b6a7df68e329ac2e0eb05ae76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1cf65a4cfe1a0af4cde63bb839bb44aab6aa875121145662bb5284148bd7879ee7544af14c280a65fb865c7e604fa615e97f21cc3c695300895af94d53117dc
|
7
|
+
data.tar.gz: 8a06af3797352eb946e87b415c7eb40aed31a59bb6a3ff11b347f03a94fe88dab58305bc0fed2dbe9c01909aedfe1d9ce6f1a65065e8fcabfbf76b0e266dddc7
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## v0.4.1 (2019-07-23)
|
2
|
+
|
3
|
+
### BugFixes
|
4
|
+
|
5
|
+
- Retry for concurrent modification ([#41](https://github.com/wata727/elastic_whenever/pull/41))
|
6
|
+
|
7
|
+
### Chore
|
8
|
+
|
9
|
+
- CI against Ruby 2.6 ([#40](https://github.com/wata727/elastic_whenever/pull/40))
|
10
|
+
|
1
11
|
## v0.4.0 (2018-12-19)
|
2
12
|
|
3
13
|
Elastic Whenever now supports Fargate launch type. Thanks @avinson.
|
data/elastic_whenever.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler", "~>
|
23
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
26
|
|
@@ -28,4 +28,5 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency "aws-sdk-cloudwatchevents", "~> 1.5"
|
29
29
|
spec.add_dependency "aws-sdk-iam", "~> 1.0"
|
30
30
|
spec.add_dependency "chronic", "~> 0.10"
|
31
|
+
spec.add_dependency "retryable", "~> 3.0"
|
31
32
|
end
|
data/lib/elastic_whenever.rb
CHANGED
data/lib/elastic_whenever/cli.rb
CHANGED
@@ -14,10 +14,14 @@ module ElasticWhenever
|
|
14
14
|
Logger.instance.message("Run `elastic_whenever --help' for more options.")
|
15
15
|
when Option::UPDATE_MODE
|
16
16
|
option.validate!
|
17
|
-
|
17
|
+
with_concurrent_modification_handling do
|
18
|
+
update_tasks(option, dry_run: false)
|
19
|
+
end
|
18
20
|
Logger.instance.log("write", "scheduled tasks updated")
|
19
21
|
when Option::CLEAR_MODE
|
20
|
-
|
22
|
+
with_concurrent_modification_handling do
|
23
|
+
clear_tasks(option)
|
24
|
+
end
|
21
25
|
Logger.instance.log("write", "shceduled tasks cleared")
|
22
26
|
when Option::LIST_MODE
|
23
27
|
list_tasks(option)
|
@@ -104,6 +108,19 @@ module ElasticWhenever
|
|
104
108
|
puts
|
105
109
|
end
|
106
110
|
end
|
111
|
+
|
112
|
+
def with_concurrent_modification_handling
|
113
|
+
Retryable.retryable(
|
114
|
+
tries: 5,
|
115
|
+
on: Aws::CloudWatchEvents::Errors::ConcurrentModificationException,
|
116
|
+
sleep: lambda { |_n| rand(1..10) },
|
117
|
+
) do |retries, exn|
|
118
|
+
if retries > 0
|
119
|
+
Logger.instance.warn("concurrent modification detected; Retrying...")
|
120
|
+
end
|
121
|
+
yield
|
122
|
+
end
|
123
|
+
end
|
107
124
|
end
|
108
125
|
end
|
109
126
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_whenever
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuma Watanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.10'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: retryable
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
111
125
|
description: Manage ECS Scheduled Tasks like Whenever
|
112
126
|
email:
|
113
127
|
- watassbass@gmail.com
|
@@ -158,8 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
requirements: []
|
161
|
-
|
162
|
-
rubygems_version: 2.6.11
|
175
|
+
rubygems_version: 3.0.3
|
163
176
|
signing_key:
|
164
177
|
specification_version: 4
|
165
178
|
summary: Manage ECS Scheduled Tasks like Whenever
|