cloudtasker 0.12.2 → 0.13.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint_rubocop.yml +20 -0
- data/.github/workflows/{test.yml → test_ruby_2.5_2.6.yml} +7 -8
- data/.github/workflows/test_ruby_2.7.yml +40 -0
- data/.github/workflows/test_ruby_3.x.yml +39 -0
- data/.rubocop.yml +5 -0
- data/Appraisals +20 -0
- data/CHANGELOG.md +9 -0
- data/README.md +10 -2
- data/Rakefile +0 -6
- data/cloudtasker.gemspec +0 -5
- data/gemfiles/google_cloud_tasks_1.0.gemfile +1 -0
- data/gemfiles/google_cloud_tasks_1.0.gemfile.lock +4 -173
- data/gemfiles/google_cloud_tasks_1.1.gemfile +1 -0
- data/gemfiles/google_cloud_tasks_1.1.gemfile.lock +4 -173
- data/gemfiles/google_cloud_tasks_1.2.gemfile +1 -0
- data/gemfiles/google_cloud_tasks_1.2.gemfile.lock +4 -173
- data/gemfiles/google_cloud_tasks_1.3.gemfile +1 -0
- data/gemfiles/google_cloud_tasks_1.3.gemfile.lock +4 -173
- data/gemfiles/rails_5.2.gemfile +1 -0
- data/gemfiles/rails_5.2.gemfile.lock +4 -53
- data/gemfiles/rails_6.0.gemfile +1 -0
- data/gemfiles/rails_6.0.gemfile.lock +4 -53
- data/gemfiles/rails_6.1.gemfile +8 -0
- data/gemfiles/rails_7.0.gemfile +8 -0
- data/gemfiles/semantic_logger_3.4.gemfile +1 -0
- data/gemfiles/semantic_logger_4.6.gemfile +1 -0
- data/gemfiles/semantic_logger_4.7.0.gemfile +1 -0
- data/gemfiles/semantic_logger_4.7.2.gemfile +1 -0
- data/lib/cloudtasker/backend/google_cloud_task.rb +12 -8
- data/lib/cloudtasker/backend/memory_task.rb +1 -1
- data/lib/cloudtasker/backend/redis_task.rb +7 -3
- data/lib/cloudtasker/cloud_task.rb +2 -2
- data/lib/cloudtasker/cron/schedule.rb +7 -7
- data/lib/cloudtasker/redis_client.rb +39 -14
- data/lib/cloudtasker/unique_job/job.rb +3 -2
- data/lib/cloudtasker/unique_job/middleware/client.rb +2 -1
- data/lib/cloudtasker/version.rb +1 -1
- data/lib/cloudtasker/worker.rb +3 -3
- data/lib/cloudtasker/worker_wrapper.rb +1 -1
- metadata +11 -62
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
cloudtasker (0.
|
4
|
+
cloudtasker (0.13.rc1)
|
5
5
|
activesupport
|
6
6
|
connection_pool
|
7
7
|
fugit
|
@@ -13,60 +13,7 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
|
17
|
-
actionpack (= 6.1.4.4)
|
18
|
-
activesupport (= 6.1.4.4)
|
19
|
-
nio4r (~> 2.0)
|
20
|
-
websocket-driver (>= 0.6.1)
|
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
|
-
mail (>= 2.7.1)
|
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
|
-
mail (~> 2.5, >= 2.5.4)
|
34
|
-
rails-dom-testing (~> 2.0)
|
35
|
-
actionpack (6.1.4.4)
|
36
|
-
actionview (= 6.1.4.4)
|
37
|
-
activesupport (= 6.1.4.4)
|
38
|
-
rack (~> 2.0, >= 2.0.9)
|
39
|
-
rack-test (>= 0.6.3)
|
40
|
-
rails-dom-testing (~> 2.0)
|
41
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
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
|
-
nokogiri (>= 1.8.5)
|
48
|
-
actionview (6.1.4.4)
|
49
|
-
activesupport (= 6.1.4.4)
|
50
|
-
builder (~> 3.1)
|
51
|
-
erubi (~> 1.4)
|
52
|
-
rails-dom-testing (~> 2.0)
|
53
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
54
|
-
activejob (6.1.4.4)
|
55
|
-
activesupport (= 6.1.4.4)
|
56
|
-
globalid (>= 0.3.6)
|
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
|
-
marcel (~> 1.0.0)
|
68
|
-
mini_mime (>= 1.1.0)
|
69
|
-
activesupport (6.1.4.4)
|
16
|
+
activesupport (6.1.0)
|
70
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
71
18
|
i18n (>= 1.6, < 2)
|
72
19
|
minitest (>= 5.1)
|
@@ -79,34 +26,11 @@ GEM
|
|
79
26
|
rake
|
80
27
|
thor (>= 0.14.0)
|
81
28
|
ast (2.4.2)
|
82
|
-
async (1.30.1)
|
83
|
-
console (~> 1.10)
|
84
|
-
nio4r (~> 2.3)
|
85
|
-
timers (~> 4.1)
|
86
|
-
async-http (0.56.5)
|
87
|
-
async (>= 1.25)
|
88
|
-
async-io (>= 1.28)
|
89
|
-
async-pool (>= 0.2)
|
90
|
-
protocol-http (~> 0.22.0)
|
91
|
-
protocol-http1 (~> 0.14.0)
|
92
|
-
protocol-http2 (~> 0.14.0)
|
93
|
-
async-http-faraday (0.11.0)
|
94
|
-
async-http (~> 0.42)
|
95
|
-
faraday
|
96
|
-
async-io (1.32.2)
|
97
|
-
async
|
98
|
-
async-pool (0.3.9)
|
99
|
-
async (>= 1.25)
|
100
|
-
builder (3.2.4)
|
101
29
|
concurrent-ruby (1.1.9)
|
102
30
|
connection_pool (2.2.5)
|
103
|
-
console (1.14.0)
|
104
|
-
fiber-local
|
105
31
|
crack (0.4.5)
|
106
32
|
rexml
|
107
|
-
crass (1.0.6)
|
108
33
|
diff-lcs (1.5.0)
|
109
|
-
erubi (1.10.0)
|
110
34
|
et-orbi (1.2.6)
|
111
35
|
tzinfo
|
112
36
|
faraday (1.8.0)
|
@@ -123,28 +47,14 @@ GEM
|
|
123
47
|
faraday-em_http (1.0.0)
|
124
48
|
faraday-em_synchrony (1.0.0)
|
125
49
|
faraday-excon (1.1.0)
|
126
|
-
faraday-http-cache (2.2.0)
|
127
|
-
faraday (>= 0.8)
|
128
50
|
faraday-httpclient (1.0.1)
|
129
51
|
faraday-net_http (1.0.1)
|
130
52
|
faraday-net_http_persistent (1.2.0)
|
131
53
|
faraday-patron (1.0.0)
|
132
54
|
faraday-rack (1.0.0)
|
133
|
-
fiber-local (1.0.0)
|
134
55
|
fugit (1.5.2)
|
135
56
|
et-orbi (~> 1.1, >= 1.1.8)
|
136
57
|
raabro (~> 1.4)
|
137
|
-
github_changelog_generator (1.16.4)
|
138
|
-
activesupport
|
139
|
-
async (>= 1.25.0)
|
140
|
-
async-http-faraday
|
141
|
-
faraday-http-cache
|
142
|
-
multi_json
|
143
|
-
octokit (~> 4.6)
|
144
|
-
rainbow (>= 2.2.1)
|
145
|
-
rake (>= 10.0)
|
146
|
-
globalid (1.0.0)
|
147
|
-
activesupport (>= 5.0)
|
148
58
|
google-cloud-tasks (1.3.0)
|
149
59
|
google-gax (~> 1.8)
|
150
60
|
googleapis-common-protos (>= 1.3.9, < 2.0)
|
@@ -183,69 +93,16 @@ GEM
|
|
183
93
|
concurrent-ruby (~> 1.0)
|
184
94
|
jaro_winkler (1.5.4)
|
185
95
|
jwt (2.3.0)
|
186
|
-
loofah (2.13.0)
|
187
|
-
crass (~> 1.0.2)
|
188
|
-
nokogiri (>= 1.5.9)
|
189
|
-
mail (2.7.1)
|
190
|
-
mini_mime (>= 0.1.1)
|
191
|
-
marcel (1.0.2)
|
192
96
|
memoist (0.16.2)
|
193
|
-
method_source (1.0.0)
|
194
|
-
mini_mime (1.1.2)
|
195
|
-
mini_portile2 (2.6.1)
|
196
97
|
minitest (5.15.0)
|
197
98
|
multi_json (1.15.0)
|
198
99
|
multipart-post (2.1.1)
|
199
|
-
nio4r (2.5.8)
|
200
|
-
nokogiri (1.12.5)
|
201
|
-
mini_portile2 (~> 2.6.1)
|
202
|
-
racc (~> 1.4)
|
203
|
-
octokit (4.21.0)
|
204
|
-
faraday (>= 0.9)
|
205
|
-
sawyer (~> 0.8.0, >= 0.5.3)
|
206
100
|
os (1.1.4)
|
207
101
|
parallel (1.21.0)
|
208
102
|
parser (3.0.3.2)
|
209
103
|
ast (~> 2.4.1)
|
210
|
-
protocol-hpack (1.4.2)
|
211
|
-
protocol-http (0.22.5)
|
212
|
-
protocol-http1 (0.14.2)
|
213
|
-
protocol-http (~> 0.22)
|
214
|
-
protocol-http2 (0.14.2)
|
215
|
-
protocol-hpack (~> 1.4)
|
216
|
-
protocol-http (~> 0.18)
|
217
104
|
public_suffix (4.0.6)
|
218
105
|
raabro (1.4.0)
|
219
|
-
racc (1.6.0)
|
220
|
-
rack (2.2.3)
|
221
|
-
rack-test (1.1.0)
|
222
|
-
rack (>= 1.0, < 3)
|
223
|
-
rails (6.1.4.4)
|
224
|
-
actioncable (= 6.1.4.4)
|
225
|
-
actionmailbox (= 6.1.4.4)
|
226
|
-
actionmailer (= 6.1.4.4)
|
227
|
-
actionpack (= 6.1.4.4)
|
228
|
-
actiontext (= 6.1.4.4)
|
229
|
-
actionview (= 6.1.4.4)
|
230
|
-
activejob (= 6.1.4.4)
|
231
|
-
activemodel (= 6.1.4.4)
|
232
|
-
activerecord (= 6.1.4.4)
|
233
|
-
activestorage (= 6.1.4.4)
|
234
|
-
activesupport (= 6.1.4.4)
|
235
|
-
bundler (>= 1.15.0)
|
236
|
-
railties (= 6.1.4.4)
|
237
|
-
sprockets-rails (>= 2.0.0)
|
238
|
-
rails-dom-testing (2.0.3)
|
239
|
-
activesupport (>= 4.2.0)
|
240
|
-
nokogiri (>= 1.6)
|
241
|
-
rails-html-sanitizer (1.4.2)
|
242
|
-
loofah (~> 2.3)
|
243
|
-
railties (6.1.4.4)
|
244
|
-
actionpack (= 6.1.4.4)
|
245
|
-
activesupport (= 6.1.4.4)
|
246
|
-
method_source
|
247
|
-
rake (>= 0.13)
|
248
|
-
thor (~> 1.0)
|
249
106
|
rainbow (3.0.0)
|
250
107
|
rake (13.0.6)
|
251
108
|
redis (4.5.1)
|
@@ -265,14 +122,6 @@ GEM
|
|
265
122
|
rspec-mocks (3.10.2)
|
266
123
|
diff-lcs (>= 1.2.0, < 2.0)
|
267
124
|
rspec-support (~> 3.10.0)
|
268
|
-
rspec-rails (5.0.2)
|
269
|
-
actionpack (>= 5.2)
|
270
|
-
activesupport (>= 5.2)
|
271
|
-
railties (>= 5.2)
|
272
|
-
rspec-core (~> 3.10)
|
273
|
-
rspec-expectations (~> 3.10)
|
274
|
-
rspec-mocks (~> 3.10)
|
275
|
-
rspec-support (~> 3.10)
|
276
125
|
rspec-support (3.10.3)
|
277
126
|
rubocop (0.76.0)
|
278
127
|
jaro_winkler (~> 1.5.1)
|
@@ -285,9 +134,6 @@ GEM
|
|
285
134
|
rubocop (>= 0.68.1)
|
286
135
|
ruby-progressbar (1.11.0)
|
287
136
|
ruby2_keywords (0.0.5)
|
288
|
-
sawyer (0.8.2)
|
289
|
-
addressable (>= 2.3.5)
|
290
|
-
faraday (> 0.8, < 2.0)
|
291
137
|
semantic_logger (4.9.0)
|
292
138
|
concurrent-ruby (~> 1.0)
|
293
139
|
signet (0.16.0)
|
@@ -295,17 +141,8 @@ GEM
|
|
295
141
|
faraday (>= 0.17.3, < 2.0)
|
296
142
|
jwt (>= 1.5, < 3.0)
|
297
143
|
multi_json (~> 1.10)
|
298
|
-
sprockets (4.0.2)
|
299
|
-
concurrent-ruby (~> 1.0)
|
300
|
-
rack (> 1, < 3)
|
301
|
-
sprockets-rails (3.4.2)
|
302
|
-
actionpack (>= 5.2)
|
303
|
-
activesupport (>= 5.2)
|
304
|
-
sprockets (>= 3.0.0)
|
305
|
-
sqlite3 (1.4.2)
|
306
144
|
thor (1.1.0)
|
307
145
|
timecop (0.9.4)
|
308
|
-
timers (4.3.3)
|
309
146
|
tzinfo (2.0.4)
|
310
147
|
concurrent-ruby (~> 1.0)
|
311
148
|
unicode-display_width (1.6.1)
|
@@ -313,31 +150,25 @@ GEM
|
|
313
150
|
addressable (>= 2.8.0)
|
314
151
|
crack (>= 0.3.2)
|
315
152
|
hashdiff (>= 0.4.0, < 2.0.0)
|
316
|
-
websocket-driver (0.7.5)
|
317
|
-
websocket-extensions (>= 0.1.0)
|
318
|
-
websocket-extensions (0.1.5)
|
319
153
|
zeitwerk (2.5.3)
|
320
154
|
|
321
155
|
PLATFORMS
|
322
156
|
ruby
|
323
157
|
|
324
158
|
DEPENDENCIES
|
159
|
+
activesupport (= 6.1)
|
325
160
|
appraisal
|
326
161
|
bundler (~> 2.0)
|
327
162
|
cloudtasker!
|
328
|
-
github_changelog_generator
|
329
163
|
google-cloud-tasks (= 1.3)
|
330
|
-
rails
|
331
164
|
rake (>= 12.3.3)
|
332
165
|
rspec (~> 3.0)
|
333
166
|
rspec-json_expectations (~> 2.2)
|
334
|
-
rspec-rails
|
335
167
|
rubocop (= 0.76.0)
|
336
168
|
rubocop-rspec (= 1.37.0)
|
337
169
|
semantic_logger
|
338
|
-
sqlite3
|
339
170
|
timecop
|
340
171
|
webmock
|
341
172
|
|
342
173
|
BUNDLED WITH
|
343
|
-
2.
|
174
|
+
2.3.4
|
data/gemfiles/rails_5.2.gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
cloudtasker (0.
|
4
|
+
cloudtasker (0.13.rc1)
|
5
5
|
activesupport
|
6
6
|
connection_pool
|
7
7
|
fugit
|
@@ -62,29 +62,9 @@ GEM
|
|
62
62
|
thor (>= 0.14.0)
|
63
63
|
arel (9.0.0)
|
64
64
|
ast (2.4.2)
|
65
|
-
async (1.30.1)
|
66
|
-
console (~> 1.10)
|
67
|
-
nio4r (~> 2.3)
|
68
|
-
timers (~> 4.1)
|
69
|
-
async-http (0.56.5)
|
70
|
-
async (>= 1.25)
|
71
|
-
async-io (>= 1.28)
|
72
|
-
async-pool (>= 0.2)
|
73
|
-
protocol-http (~> 0.22.0)
|
74
|
-
protocol-http1 (~> 0.14.0)
|
75
|
-
protocol-http2 (~> 0.14.0)
|
76
|
-
async-http-faraday (0.11.0)
|
77
|
-
async-http (~> 0.42)
|
78
|
-
faraday
|
79
|
-
async-io (1.32.2)
|
80
|
-
async
|
81
|
-
async-pool (0.3.9)
|
82
|
-
async (>= 1.25)
|
83
65
|
builder (3.2.4)
|
84
66
|
concurrent-ruby (1.1.9)
|
85
67
|
connection_pool (2.2.5)
|
86
|
-
console (1.14.0)
|
87
|
-
fiber-local
|
88
68
|
crack (0.4.5)
|
89
69
|
rexml
|
90
70
|
crass (1.0.6)
|
@@ -106,26 +86,14 @@ GEM
|
|
106
86
|
faraday-em_http (1.0.0)
|
107
87
|
faraday-em_synchrony (1.0.0)
|
108
88
|
faraday-excon (1.1.0)
|
109
|
-
faraday-http-cache (2.2.0)
|
110
|
-
faraday (>= 0.8)
|
111
89
|
faraday-httpclient (1.0.1)
|
112
90
|
faraday-net_http (1.0.1)
|
113
91
|
faraday-net_http_persistent (1.2.0)
|
114
92
|
faraday-patron (1.0.0)
|
115
93
|
faraday-rack (1.0.0)
|
116
|
-
fiber-local (1.0.0)
|
117
94
|
fugit (1.5.2)
|
118
95
|
et-orbi (~> 1.1, >= 1.1.8)
|
119
96
|
raabro (~> 1.4)
|
120
|
-
github_changelog_generator (1.16.4)
|
121
|
-
activesupport
|
122
|
-
async (>= 1.25.0)
|
123
|
-
async-http-faraday
|
124
|
-
faraday-http-cache
|
125
|
-
multi_json
|
126
|
-
octokit (~> 4.6)
|
127
|
-
rainbow (>= 2.2.1)
|
128
|
-
rake (>= 10.0)
|
129
97
|
globalid (1.0.0)
|
130
98
|
activesupport (>= 5.0)
|
131
99
|
google-cloud-tasks (1.5.1)
|
@@ -140,7 +108,7 @@ GEM
|
|
140
108
|
googleauth (~> 0.9)
|
141
109
|
grpc (~> 1.24)
|
142
110
|
rly (~> 0.2.3)
|
143
|
-
google-protobuf (3.19.1)
|
111
|
+
google-protobuf (3.19.1-x86_64-darwin)
|
144
112
|
googleapis-common-protos (1.3.12)
|
145
113
|
google-protobuf (~> 3.14)
|
146
114
|
googleapis-common-protos-types (~> 1.2)
|
@@ -154,7 +122,7 @@ GEM
|
|
154
122
|
multi_json (~> 1.11)
|
155
123
|
os (>= 0.9, < 2.0)
|
156
124
|
signet (~> 0.15)
|
157
|
-
grpc (1.42.0)
|
125
|
+
grpc (1.42.0-x86_64-darwin)
|
158
126
|
google-protobuf (~> 3.18)
|
159
127
|
googleapis-common-protos-types (~> 1.0)
|
160
128
|
grpc-google-iam-v1 (0.6.11)
|
@@ -187,20 +155,10 @@ GEM
|
|
187
155
|
nokogiri (1.12.5)
|
188
156
|
mini_portile2 (~> 2.6.1)
|
189
157
|
racc (~> 1.4)
|
190
|
-
octokit (4.21.0)
|
191
|
-
faraday (>= 0.9)
|
192
|
-
sawyer (~> 0.8.0, >= 0.5.3)
|
193
158
|
os (1.1.4)
|
194
159
|
parallel (1.21.0)
|
195
160
|
parser (3.0.3.2)
|
196
161
|
ast (~> 2.4.1)
|
197
|
-
protocol-hpack (1.4.2)
|
198
|
-
protocol-http (0.22.5)
|
199
|
-
protocol-http1 (0.14.2)
|
200
|
-
protocol-http (~> 0.22)
|
201
|
-
protocol-http2 (0.14.2)
|
202
|
-
protocol-hpack (~> 1.4)
|
203
|
-
protocol-http (~> 0.18)
|
204
162
|
public_suffix (4.0.6)
|
205
163
|
raabro (1.4.0)
|
206
164
|
racc (1.6.0)
|
@@ -270,9 +228,6 @@ GEM
|
|
270
228
|
rubocop (>= 0.68.1)
|
271
229
|
ruby-progressbar (1.11.0)
|
272
230
|
ruby2_keywords (0.0.5)
|
273
|
-
sawyer (0.8.2)
|
274
|
-
addressable (>= 2.3.5)
|
275
|
-
faraday (> 0.8, < 2.0)
|
276
231
|
semantic_logger (4.9.0)
|
277
232
|
concurrent-ruby (~> 1.0)
|
278
233
|
signet (0.16.0)
|
@@ -287,11 +242,9 @@ GEM
|
|
287
242
|
actionpack (>= 5.2)
|
288
243
|
activesupport (>= 5.2)
|
289
244
|
sprockets (>= 3.0.0)
|
290
|
-
sqlite3 (1.4.2)
|
291
245
|
thor (1.1.0)
|
292
246
|
thread_safe (0.3.6)
|
293
247
|
timecop (0.9.4)
|
294
|
-
timers (4.3.3)
|
295
248
|
tzinfo (1.2.9)
|
296
249
|
thread_safe (~> 0.1)
|
297
250
|
unicode-display_width (1.6.1)
|
@@ -310,7 +263,6 @@ DEPENDENCIES
|
|
310
263
|
appraisal
|
311
264
|
bundler (~> 2.0)
|
312
265
|
cloudtasker!
|
313
|
-
github_changelog_generator
|
314
266
|
rails (= 5.2)
|
315
267
|
rake (>= 12.3.3)
|
316
268
|
rspec (~> 3.0)
|
@@ -319,9 +271,8 @@ DEPENDENCIES
|
|
319
271
|
rubocop (= 0.76.0)
|
320
272
|
rubocop-rspec (= 1.37.0)
|
321
273
|
semantic_logger
|
322
|
-
sqlite3
|
323
274
|
timecop
|
324
275
|
webmock
|
325
276
|
|
326
277
|
BUNDLED WITH
|
327
|
-
2.
|
278
|
+
2.3.4
|
data/gemfiles/rails_6.0.gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
cloudtasker (0.
|
4
|
+
cloudtasker (0.13.rc1)
|
5
5
|
activesupport
|
6
6
|
connection_pool
|
7
7
|
fugit
|
@@ -75,29 +75,9 @@ GEM
|
|
75
75
|
rake
|
76
76
|
thor (>= 0.14.0)
|
77
77
|
ast (2.4.2)
|
78
|
-
async (1.30.1)
|
79
|
-
console (~> 1.10)
|
80
|
-
nio4r (~> 2.3)
|
81
|
-
timers (~> 4.1)
|
82
|
-
async-http (0.56.5)
|
83
|
-
async (>= 1.25)
|
84
|
-
async-io (>= 1.28)
|
85
|
-
async-pool (>= 0.2)
|
86
|
-
protocol-http (~> 0.22.0)
|
87
|
-
protocol-http1 (~> 0.14.0)
|
88
|
-
protocol-http2 (~> 0.14.0)
|
89
|
-
async-http-faraday (0.11.0)
|
90
|
-
async-http (~> 0.42)
|
91
|
-
faraday
|
92
|
-
async-io (1.32.2)
|
93
|
-
async
|
94
|
-
async-pool (0.3.9)
|
95
|
-
async (>= 1.25)
|
96
78
|
builder (3.2.4)
|
97
79
|
concurrent-ruby (1.1.9)
|
98
80
|
connection_pool (2.2.5)
|
99
|
-
console (1.14.0)
|
100
|
-
fiber-local
|
101
81
|
crack (0.4.5)
|
102
82
|
rexml
|
103
83
|
crass (1.0.6)
|
@@ -119,26 +99,14 @@ GEM
|
|
119
99
|
faraday-em_http (1.0.0)
|
120
100
|
faraday-em_synchrony (1.0.0)
|
121
101
|
faraday-excon (1.1.0)
|
122
|
-
faraday-http-cache (2.2.0)
|
123
|
-
faraday (>= 0.8)
|
124
102
|
faraday-httpclient (1.0.1)
|
125
103
|
faraday-net_http (1.0.1)
|
126
104
|
faraday-net_http_persistent (1.2.0)
|
127
105
|
faraday-patron (1.0.0)
|
128
106
|
faraday-rack (1.0.0)
|
129
|
-
fiber-local (1.0.0)
|
130
107
|
fugit (1.5.2)
|
131
108
|
et-orbi (~> 1.1, >= 1.1.8)
|
132
109
|
raabro (~> 1.4)
|
133
|
-
github_changelog_generator (1.16.4)
|
134
|
-
activesupport
|
135
|
-
async (>= 1.25.0)
|
136
|
-
async-http-faraday
|
137
|
-
faraday-http-cache
|
138
|
-
multi_json
|
139
|
-
octokit (~> 4.6)
|
140
|
-
rainbow (>= 2.2.1)
|
141
|
-
rake (>= 10.0)
|
142
110
|
globalid (1.0.0)
|
143
111
|
activesupport (>= 5.0)
|
144
112
|
google-cloud-tasks (1.5.1)
|
@@ -153,7 +121,7 @@ GEM
|
|
153
121
|
googleauth (~> 0.9)
|
154
122
|
grpc (~> 1.24)
|
155
123
|
rly (~> 0.2.3)
|
156
|
-
google-protobuf (3.19.1)
|
124
|
+
google-protobuf (3.19.1-x86_64-darwin)
|
157
125
|
googleapis-common-protos (1.3.12)
|
158
126
|
google-protobuf (~> 3.14)
|
159
127
|
googleapis-common-protos-types (~> 1.2)
|
@@ -167,7 +135,7 @@ GEM
|
|
167
135
|
multi_json (~> 1.11)
|
168
136
|
os (>= 0.9, < 2.0)
|
169
137
|
signet (~> 0.15)
|
170
|
-
grpc (1.42.0)
|
138
|
+
grpc (1.42.0-x86_64-darwin)
|
171
139
|
google-protobuf (~> 3.18)
|
172
140
|
googleapis-common-protos-types (~> 1.0)
|
173
141
|
grpc-google-iam-v1 (0.6.11)
|
@@ -200,20 +168,10 @@ GEM
|
|
200
168
|
nokogiri (1.12.5)
|
201
169
|
mini_portile2 (~> 2.6.1)
|
202
170
|
racc (~> 1.4)
|
203
|
-
octokit (4.21.0)
|
204
|
-
faraday (>= 0.9)
|
205
|
-
sawyer (~> 0.8.0, >= 0.5.3)
|
206
171
|
os (1.1.4)
|
207
172
|
parallel (1.21.0)
|
208
173
|
parser (3.0.3.2)
|
209
174
|
ast (~> 2.4.1)
|
210
|
-
protocol-hpack (1.4.2)
|
211
|
-
protocol-http (0.22.5)
|
212
|
-
protocol-http1 (0.14.2)
|
213
|
-
protocol-http (~> 0.22)
|
214
|
-
protocol-http2 (0.14.2)
|
215
|
-
protocol-hpack (~> 1.4)
|
216
|
-
protocol-http (~> 0.18)
|
217
175
|
public_suffix (4.0.6)
|
218
176
|
raabro (1.4.0)
|
219
177
|
racc (1.6.0)
|
@@ -285,9 +243,6 @@ GEM
|
|
285
243
|
rubocop (>= 0.68.1)
|
286
244
|
ruby-progressbar (1.11.0)
|
287
245
|
ruby2_keywords (0.0.5)
|
288
|
-
sawyer (0.8.2)
|
289
|
-
addressable (>= 2.3.5)
|
290
|
-
faraday (> 0.8, < 2.0)
|
291
246
|
semantic_logger (4.9.0)
|
292
247
|
concurrent-ruby (~> 1.0)
|
293
248
|
signet (0.16.0)
|
@@ -302,11 +257,9 @@ GEM
|
|
302
257
|
actionpack (>= 5.2)
|
303
258
|
activesupport (>= 5.2)
|
304
259
|
sprockets (>= 3.0.0)
|
305
|
-
sqlite3 (1.4.2)
|
306
260
|
thor (1.1.0)
|
307
261
|
thread_safe (0.3.6)
|
308
262
|
timecop (0.9.4)
|
309
|
-
timers (4.3.3)
|
310
263
|
tzinfo (1.2.9)
|
311
264
|
thread_safe (~> 0.1)
|
312
265
|
unicode-display_width (1.6.1)
|
@@ -326,7 +279,6 @@ DEPENDENCIES
|
|
326
279
|
appraisal
|
327
280
|
bundler (~> 2.0)
|
328
281
|
cloudtasker!
|
329
|
-
github_changelog_generator
|
330
282
|
rails (= 6.0)
|
331
283
|
rake (>= 12.3.3)
|
332
284
|
rspec (~> 3.0)
|
@@ -335,9 +287,8 @@ DEPENDENCIES
|
|
335
287
|
rubocop (= 0.76.0)
|
336
288
|
rubocop-rspec (= 1.37.0)
|
337
289
|
semantic_logger
|
338
|
-
sqlite3
|
339
290
|
timecop
|
340
291
|
webmock
|
341
292
|
|
342
293
|
BUNDLED WITH
|
343
|
-
2.
|
294
|
+
2.3.4
|
@@ -12,28 +12,32 @@ module Cloudtasker
|
|
12
12
|
#
|
13
13
|
# Create the queue configured in Cloudtasker if it does not already exist.
|
14
14
|
#
|
15
|
-
# @param [String]
|
15
|
+
# @param [String] :name The queue name
|
16
|
+
# @param [Integer] :concurrency The queue concurrency
|
17
|
+
# @param [Integer] :retries The number of retries for the queue
|
16
18
|
#
|
17
19
|
# @return [Google::Cloud::Tasks::V2beta3::Queue] The queue
|
18
20
|
#
|
19
|
-
def self.setup_queue(
|
21
|
+
def self.setup_queue(name: nil, concurrency: nil, retries: nil)
|
20
22
|
# Build full queue path
|
21
|
-
queue_name =
|
23
|
+
queue_name = name || Cloudtasker::Config::DEFAULT_JOB_QUEUE
|
22
24
|
full_queue_name = queue_path(queue_name)
|
23
25
|
|
24
26
|
# Try to get existing queue
|
25
27
|
client.get_queue(full_queue_name)
|
26
28
|
rescue Google::Gax::RetryError
|
27
29
|
# Extract options
|
28
|
-
|
29
|
-
|
30
|
+
queue_concurrency = (concurrency || Cloudtasker::Config::DEFAULT_QUEUE_CONCURRENCY).to_i
|
31
|
+
queue_retries = (retries || Cloudtasker::Config::DEFAULT_QUEUE_RETRIES).to_i
|
30
32
|
|
31
33
|
# Create queue on 'not found' error
|
32
34
|
client.create_queue(
|
33
35
|
client.location_path(config.gcp_project_id, config.gcp_location_id),
|
34
|
-
|
35
|
-
|
36
|
-
|
36
|
+
{
|
37
|
+
name: full_queue_name,
|
38
|
+
retry_config: { max_attempts: queue_retries },
|
39
|
+
rate_limits: { max_concurrent_dispatches: queue_concurrency }
|
40
|
+
}
|
37
41
|
)
|
38
42
|
end
|
39
43
|
|
@@ -62,7 +62,7 @@ module Cloudtasker
|
|
62
62
|
payload = payload.merge(schedule_time: payload[:schedule_time].to_i)
|
63
63
|
|
64
64
|
# Save task
|
65
|
-
task = new(payload.merge(id: id))
|
65
|
+
task = new(**payload.merge(id: id))
|
66
66
|
queue << task
|
67
67
|
|
68
68
|
# Execute task immediately if in testing and inline mode enabled
|