cloudtasker 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/docs/CRON_JOBS.md +39 -0
- data/gemfiles/google_cloud_tasks_1.0.gemfile.lock +91 -90
- data/gemfiles/google_cloud_tasks_1.1.gemfile.lock +91 -90
- data/gemfiles/google_cloud_tasks_1.2.gemfile.lock +91 -90
- data/gemfiles/google_cloud_tasks_1.3.gemfile.lock +91 -90
- data/gemfiles/rails_5.2.gemfile.lock +36 -35
- data/gemfiles/rails_6.0.gemfile.lock +37 -36
- data/lib/cloudtasker/local_server.rb +1 -1
- data/lib/cloudtasker/version.rb +1 -1
- data/lib/cloudtasker/worker.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: 2d051d238265fe5c1b1e48203c121e7284a26340026ff481e4c6240703de073b
|
4
|
+
data.tar.gz: bb785d5f8f7834bb1ef885c9bb939a43925e933c34abcf94a9609b292813b03d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81926768a084ba79aff1ae466f7dc2a11ac883c0b57f6fd41787dbedf3434d0979762158728c4548217bd06b0df2692e8bffe8cbd3d02bda447336610d4de2c0
|
7
|
+
data.tar.gz: 1ce88e8633716f8ea379affd0ef7c705ec7fc48ebdd100c0e6f525fd0e5ca61ac4f3349dde3c53ee7815e23761dbd8cfa9e1d6d2f0b1e80f9892d1b92065c61b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.12.2](https://github.com/keypup-io/cloudtasker/tree/v0.12.2) (2021-12-31)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.12.1...v0.12.2)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
- Local server: Fix race condition on thread processing. See [#46](https://github.com/keypup-io/cloudtasker/pull/46)
|
9
|
+
- Non-Rails: Fix `arguments_missing?` check for non-rails projects.
|
10
|
+
|
3
11
|
## [v0.12.1](https://github.com/keypup-io/cloudtasker/tree/v0.12.1) (2021-08-25)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.12.0...v0.12.1)
|
data/docs/CRON_JOBS.md
CHANGED
@@ -65,3 +65,42 @@ if File.exist?(schedule_file) && !Rails.env.test?
|
|
65
65
|
end
|
66
66
|
```
|
67
67
|
|
68
|
+
## Limitations
|
69
|
+
GCP Cloud Tasks does not allow tasks to be scheduled more than 30 days (720h) in the future. Cron schedules should therefore be limited to 30 days intervals at most.
|
70
|
+
|
71
|
+
If you need to schedule a job to run on a monthly basis (e.g. on the first of the month), schedule this job to run every day then add the following logic in your job:
|
72
|
+
```ruby
|
73
|
+
#
|
74
|
+
# Cron schedule (8am UTC every day): 0 8 * * *
|
75
|
+
#
|
76
|
+
class MyMonthlyWorker
|
77
|
+
include Cloudtasker::Worker
|
78
|
+
|
79
|
+
def perform(*args)
|
80
|
+
# Abort unless we're the first of the month
|
81
|
+
return unless Time.current.day == 1
|
82
|
+
|
83
|
+
# ... job logic
|
84
|
+
end
|
85
|
+
end
|
86
|
+
```
|
87
|
+
|
88
|
+
The same approach can be used to schedule a job every quarter.
|
89
|
+
```ruby
|
90
|
+
#
|
91
|
+
# Cron schedule (8am UTC every day): 0 8 * * *
|
92
|
+
#
|
93
|
+
class MyQuarterlyWorker
|
94
|
+
include Cloudtasker::Worker
|
95
|
+
|
96
|
+
def perform(*args)
|
97
|
+
# Abort unless we're the first month of a quarter (Jan, Apr, Jul, Oct)
|
98
|
+
return unless Time.current.month == 1
|
99
|
+
|
100
|
+
# Abort unless we're the first of the month
|
101
|
+
return unless Time.current.day == 1
|
102
|
+
|
103
|
+
# ... job logic
|
104
|
+
end
|
105
|
+
end
|
106
|
+
```
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
cloudtasker (0.12.
|
4
|
+
cloudtasker (0.12.2)
|
5
5
|
activesupport
|
6
6
|
connection_pool
|
7
7
|
fugit
|
@@ -13,60 +13,60 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
actioncable (6.1.4.
|
17
|
-
actionpack (= 6.1.4.
|
18
|
-
activesupport (= 6.1.4.
|
16
|
+
actioncable (6.1.4.4)
|
17
|
+
actionpack (= 6.1.4.4)
|
18
|
+
activesupport (= 6.1.4.4)
|
19
19
|
nio4r (~> 2.0)
|
20
20
|
websocket-driver (>= 0.6.1)
|
21
|
-
actionmailbox (6.1.4.
|
22
|
-
actionpack (= 6.1.4.
|
23
|
-
activejob (= 6.1.4.
|
24
|
-
activerecord (= 6.1.4.
|
25
|
-
activestorage (= 6.1.4.
|
26
|
-
activesupport (= 6.1.4.
|
21
|
+
actionmailbox (6.1.4.4)
|
22
|
+
actionpack (= 6.1.4.4)
|
23
|
+
activejob (= 6.1.4.4)
|
24
|
+
activerecord (= 6.1.4.4)
|
25
|
+
activestorage (= 6.1.4.4)
|
26
|
+
activesupport (= 6.1.4.4)
|
27
27
|
mail (>= 2.7.1)
|
28
|
-
actionmailer (6.1.4.
|
29
|
-
actionpack (= 6.1.4.
|
30
|
-
actionview (= 6.1.4.
|
31
|
-
activejob (= 6.1.4.
|
32
|
-
activesupport (= 6.1.4.
|
28
|
+
actionmailer (6.1.4.4)
|
29
|
+
actionpack (= 6.1.4.4)
|
30
|
+
actionview (= 6.1.4.4)
|
31
|
+
activejob (= 6.1.4.4)
|
32
|
+
activesupport (= 6.1.4.4)
|
33
33
|
mail (~> 2.5, >= 2.5.4)
|
34
34
|
rails-dom-testing (~> 2.0)
|
35
|
-
actionpack (6.1.4.
|
36
|
-
actionview (= 6.1.4.
|
37
|
-
activesupport (= 6.1.4.
|
35
|
+
actionpack (6.1.4.4)
|
36
|
+
actionview (= 6.1.4.4)
|
37
|
+
activesupport (= 6.1.4.4)
|
38
38
|
rack (~> 2.0, >= 2.0.9)
|
39
39
|
rack-test (>= 0.6.3)
|
40
40
|
rails-dom-testing (~> 2.0)
|
41
41
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
42
|
-
actiontext (6.1.4.
|
43
|
-
actionpack (= 6.1.4.
|
44
|
-
activerecord (= 6.1.4.
|
45
|
-
activestorage (= 6.1.4.
|
46
|
-
activesupport (= 6.1.4.
|
42
|
+
actiontext (6.1.4.4)
|
43
|
+
actionpack (= 6.1.4.4)
|
44
|
+
activerecord (= 6.1.4.4)
|
45
|
+
activestorage (= 6.1.4.4)
|
46
|
+
activesupport (= 6.1.4.4)
|
47
47
|
nokogiri (>= 1.8.5)
|
48
|
-
actionview (6.1.4.
|
49
|
-
activesupport (= 6.1.4.
|
48
|
+
actionview (6.1.4.4)
|
49
|
+
activesupport (= 6.1.4.4)
|
50
50
|
builder (~> 3.1)
|
51
51
|
erubi (~> 1.4)
|
52
52
|
rails-dom-testing (~> 2.0)
|
53
53
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
54
|
-
activejob (6.1.4.
|
55
|
-
activesupport (= 6.1.4.
|
54
|
+
activejob (6.1.4.4)
|
55
|
+
activesupport (= 6.1.4.4)
|
56
56
|
globalid (>= 0.3.6)
|
57
|
-
activemodel (6.1.4.
|
58
|
-
activesupport (= 6.1.4.
|
59
|
-
activerecord (6.1.4.
|
60
|
-
activemodel (= 6.1.4.
|
61
|
-
activesupport (= 6.1.4.
|
62
|
-
activestorage (6.1.4.
|
63
|
-
actionpack (= 6.1.4.
|
64
|
-
activejob (= 6.1.4.
|
65
|
-
activerecord (= 6.1.4.
|
66
|
-
activesupport (= 6.1.4.
|
57
|
+
activemodel (6.1.4.4)
|
58
|
+
activesupport (= 6.1.4.4)
|
59
|
+
activerecord (6.1.4.4)
|
60
|
+
activemodel (= 6.1.4.4)
|
61
|
+
activesupport (= 6.1.4.4)
|
62
|
+
activestorage (6.1.4.4)
|
63
|
+
actionpack (= 6.1.4.4)
|
64
|
+
activejob (= 6.1.4.4)
|
65
|
+
activerecord (= 6.1.4.4)
|
66
|
+
activesupport (= 6.1.4.4)
|
67
67
|
marcel (~> 1.0.0)
|
68
68
|
mini_mime (>= 1.1.0)
|
69
|
-
activesupport (6.1.4.
|
69
|
+
activesupport (6.1.4.4)
|
70
70
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
71
71
|
i18n (>= 1.6, < 2)
|
72
72
|
minitest (>= 5.1)
|
@@ -95,21 +95,21 @@ GEM
|
|
95
95
|
faraday
|
96
96
|
async-io (1.32.2)
|
97
97
|
async
|
98
|
-
async-pool (0.3.
|
98
|
+
async-pool (0.3.9)
|
99
99
|
async (>= 1.25)
|
100
100
|
builder (3.2.4)
|
101
101
|
concurrent-ruby (1.1.9)
|
102
102
|
connection_pool (2.2.5)
|
103
|
-
console (1.
|
103
|
+
console (1.14.0)
|
104
104
|
fiber-local
|
105
105
|
crack (0.4.5)
|
106
106
|
rexml
|
107
107
|
crass (1.0.6)
|
108
|
-
diff-lcs (1.
|
108
|
+
diff-lcs (1.5.0)
|
109
109
|
erubi (1.10.0)
|
110
|
-
et-orbi (1.2.
|
110
|
+
et-orbi (1.2.6)
|
111
111
|
tzinfo
|
112
|
-
faraday (1.
|
112
|
+
faraday (1.8.0)
|
113
113
|
faraday-em_http (~> 1.0)
|
114
114
|
faraday-em_synchrony (~> 1.0)
|
115
115
|
faraday-excon (~> 1.1)
|
@@ -131,7 +131,7 @@ GEM
|
|
131
131
|
faraday-patron (1.0.0)
|
132
132
|
faraday-rack (1.0.0)
|
133
133
|
fiber-local (1.0.0)
|
134
|
-
fugit (1.5.
|
134
|
+
fugit (1.5.2)
|
135
135
|
et-orbi (~> 1.1, >= 1.1.8)
|
136
136
|
raabro (~> 1.4)
|
137
137
|
github_changelog_generator (1.16.4)
|
@@ -143,67 +143,68 @@ GEM
|
|
143
143
|
octokit (~> 4.6)
|
144
144
|
rainbow (>= 2.2.1)
|
145
145
|
rake (>= 10.0)
|
146
|
-
globalid (0.
|
146
|
+
globalid (1.0.0)
|
147
147
|
activesupport (>= 5.0)
|
148
148
|
google-cloud-tasks (1.0.0)
|
149
149
|
google-gax (~> 1.3)
|
150
150
|
googleapis-common-protos (>= 1.3.9, < 2.0)
|
151
151
|
grpc-google-iam-v1 (~> 0.6.9)
|
152
|
-
google-gax (1.8.
|
152
|
+
google-gax (1.8.2)
|
153
153
|
google-protobuf (~> 3.9)
|
154
154
|
googleapis-common-protos (>= 1.3.9, < 2.0)
|
155
|
+
googleapis-common-protos-types (>= 1.0.4, < 2.0)
|
155
156
|
googleauth (~> 0.9)
|
156
157
|
grpc (~> 1.24)
|
157
158
|
rly (~> 0.2.3)
|
158
|
-
google-protobuf (3.
|
159
|
-
googleapis-common-protos (1.3.
|
159
|
+
google-protobuf (3.19.1)
|
160
|
+
googleapis-common-protos (1.3.12)
|
160
161
|
google-protobuf (~> 3.14)
|
161
|
-
googleapis-common-protos-types (
|
162
|
+
googleapis-common-protos-types (~> 1.2)
|
162
163
|
grpc (~> 1.27)
|
163
|
-
googleapis-common-protos-types (1.
|
164
|
+
googleapis-common-protos-types (1.3.0)
|
164
165
|
google-protobuf (~> 3.14)
|
165
|
-
googleauth (0.17.
|
166
|
+
googleauth (0.17.1)
|
166
167
|
faraday (>= 0.17.3, < 2.0)
|
167
168
|
jwt (>= 1.4, < 3.0)
|
168
169
|
memoist (~> 0.16)
|
169
170
|
multi_json (~> 1.11)
|
170
171
|
os (>= 0.9, < 2.0)
|
171
|
-
signet (~> 0.
|
172
|
-
grpc (1.
|
173
|
-
google-protobuf (~> 3.
|
172
|
+
signet (~> 0.15)
|
173
|
+
grpc (1.42.0)
|
174
|
+
google-protobuf (~> 3.18)
|
174
175
|
googleapis-common-protos-types (~> 1.0)
|
175
176
|
grpc-google-iam-v1 (0.6.11)
|
176
177
|
google-protobuf (~> 3.14)
|
177
178
|
googleapis-common-protos (>= 1.3.11, < 2.0)
|
178
179
|
grpc (~> 1.27)
|
179
180
|
hashdiff (1.0.1)
|
180
|
-
i18n (1.8.
|
181
|
+
i18n (1.8.11)
|
181
182
|
concurrent-ruby (~> 1.0)
|
182
183
|
jaro_winkler (1.5.4)
|
183
|
-
jwt (2.
|
184
|
-
loofah (2.
|
184
|
+
jwt (2.3.0)
|
185
|
+
loofah (2.13.0)
|
185
186
|
crass (~> 1.0.2)
|
186
187
|
nokogiri (>= 1.5.9)
|
187
188
|
mail (2.7.1)
|
188
189
|
mini_mime (>= 0.1.1)
|
189
|
-
marcel (1.0.
|
190
|
+
marcel (1.0.2)
|
190
191
|
memoist (0.16.2)
|
191
192
|
method_source (1.0.0)
|
192
|
-
mini_mime (1.1.
|
193
|
+
mini_mime (1.1.2)
|
193
194
|
mini_portile2 (2.6.1)
|
194
|
-
minitest (5.
|
195
|
+
minitest (5.15.0)
|
195
196
|
multi_json (1.15.0)
|
196
197
|
multipart-post (2.1.1)
|
197
198
|
nio4r (2.5.8)
|
198
|
-
nokogiri (1.12.
|
199
|
+
nokogiri (1.12.5)
|
199
200
|
mini_portile2 (~> 2.6.1)
|
200
201
|
racc (~> 1.4)
|
201
202
|
octokit (4.21.0)
|
202
203
|
faraday (>= 0.9)
|
203
204
|
sawyer (~> 0.8.0, >= 0.5.3)
|
204
|
-
os (1.1.
|
205
|
-
parallel (1.
|
206
|
-
parser (3.0.2
|
205
|
+
os (1.1.4)
|
206
|
+
parallel (1.21.0)
|
207
|
+
parser (3.0.3.2)
|
207
208
|
ast (~> 2.4.1)
|
208
209
|
protocol-hpack (1.4.2)
|
209
210
|
protocol-http (0.22.5)
|
@@ -214,39 +215,39 @@ GEM
|
|
214
215
|
protocol-http (~> 0.18)
|
215
216
|
public_suffix (4.0.6)
|
216
217
|
raabro (1.4.0)
|
217
|
-
racc (1.
|
218
|
+
racc (1.6.0)
|
218
219
|
rack (2.2.3)
|
219
220
|
rack-test (1.1.0)
|
220
221
|
rack (>= 1.0, < 3)
|
221
|
-
rails (6.1.4.
|
222
|
-
actioncable (= 6.1.4.
|
223
|
-
actionmailbox (= 6.1.4.
|
224
|
-
actionmailer (= 6.1.4.
|
225
|
-
actionpack (= 6.1.4.
|
226
|
-
actiontext (= 6.1.4.
|
227
|
-
actionview (= 6.1.4.
|
228
|
-
activejob (= 6.1.4.
|
229
|
-
activemodel (= 6.1.4.
|
230
|
-
activerecord (= 6.1.4.
|
231
|
-
activestorage (= 6.1.4.
|
232
|
-
activesupport (= 6.1.4.
|
222
|
+
rails (6.1.4.4)
|
223
|
+
actioncable (= 6.1.4.4)
|
224
|
+
actionmailbox (= 6.1.4.4)
|
225
|
+
actionmailer (= 6.1.4.4)
|
226
|
+
actionpack (= 6.1.4.4)
|
227
|
+
actiontext (= 6.1.4.4)
|
228
|
+
actionview (= 6.1.4.4)
|
229
|
+
activejob (= 6.1.4.4)
|
230
|
+
activemodel (= 6.1.4.4)
|
231
|
+
activerecord (= 6.1.4.4)
|
232
|
+
activestorage (= 6.1.4.4)
|
233
|
+
activesupport (= 6.1.4.4)
|
233
234
|
bundler (>= 1.15.0)
|
234
|
-
railties (= 6.1.4.
|
235
|
+
railties (= 6.1.4.4)
|
235
236
|
sprockets-rails (>= 2.0.0)
|
236
237
|
rails-dom-testing (2.0.3)
|
237
238
|
activesupport (>= 4.2.0)
|
238
239
|
nokogiri (>= 1.6)
|
239
240
|
rails-html-sanitizer (1.4.2)
|
240
241
|
loofah (~> 2.3)
|
241
|
-
railties (6.1.4.
|
242
|
-
actionpack (= 6.1.4.
|
243
|
-
activesupport (= 6.1.4.
|
242
|
+
railties (6.1.4.4)
|
243
|
+
actionpack (= 6.1.4.4)
|
244
|
+
activesupport (= 6.1.4.4)
|
244
245
|
method_source
|
245
246
|
rake (>= 0.13)
|
246
247
|
thor (~> 1.0)
|
247
248
|
rainbow (3.0.0)
|
248
249
|
rake (13.0.6)
|
249
|
-
redis (4.
|
250
|
+
redis (4.5.1)
|
250
251
|
retriable (3.1.2)
|
251
252
|
rexml (3.2.5)
|
252
253
|
rly (0.2.3)
|
@@ -271,7 +272,7 @@ GEM
|
|
271
272
|
rspec-expectations (~> 3.10)
|
272
273
|
rspec-mocks (~> 3.10)
|
273
274
|
rspec-support (~> 3.10)
|
274
|
-
rspec-support (3.10.
|
275
|
+
rspec-support (3.10.3)
|
275
276
|
rubocop (0.76.0)
|
276
277
|
jaro_winkler (~> 1.5.1)
|
277
278
|
parallel (~> 1.10)
|
@@ -286,19 +287,19 @@ GEM
|
|
286
287
|
sawyer (0.8.2)
|
287
288
|
addressable (>= 2.3.5)
|
288
289
|
faraday (> 0.8, < 2.0)
|
289
|
-
semantic_logger (4.
|
290
|
+
semantic_logger (4.9.0)
|
290
291
|
concurrent-ruby (~> 1.0)
|
291
|
-
signet (0.
|
292
|
-
addressable (~> 2.
|
292
|
+
signet (0.16.0)
|
293
|
+
addressable (~> 2.8)
|
293
294
|
faraday (>= 0.17.3, < 2.0)
|
294
295
|
jwt (>= 1.5, < 3.0)
|
295
296
|
multi_json (~> 1.10)
|
296
297
|
sprockets (4.0.2)
|
297
298
|
concurrent-ruby (~> 1.0)
|
298
299
|
rack (> 1, < 3)
|
299
|
-
sprockets-rails (3.
|
300
|
-
actionpack (>=
|
301
|
-
activesupport (>=
|
300
|
+
sprockets-rails (3.4.2)
|
301
|
+
actionpack (>= 5.2)
|
302
|
+
activesupport (>= 5.2)
|
302
303
|
sprockets (>= 3.0.0)
|
303
304
|
sqlite3 (1.4.2)
|
304
305
|
thor (1.1.0)
|
@@ -314,7 +315,7 @@ GEM
|
|
314
315
|
websocket-driver (0.7.5)
|
315
316
|
websocket-extensions (>= 0.1.0)
|
316
317
|
websocket-extensions (0.1.5)
|
317
|
-
zeitwerk (2.
|
318
|
+
zeitwerk (2.5.3)
|
318
319
|
|
319
320
|
PLATFORMS
|
320
321
|
ruby
|