que-scheduler 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/que/scheduler/jobs/que_scheduler_audit_clear_down_job.rb +1 -1
- data/lib/que/scheduler/migrations.rb +1 -1
- data/lib/que/scheduler/schedule.rb +3 -3
- data/lib/que/scheduler/scheduler_job.rb +3 -3
- data/lib/que/scheduler/version.rb +1 -1
- metadata +36 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adf8110c30a79a8eeddb300dbfe79a1ac283080983dd41befc9a6769b66efcf6
|
4
|
+
data.tar.gz: 2c800a7070b326993bda2eefea85e151ea74e40a9eb6e653fdfd10e47db59eaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44603e489c6e9a7c7715ef3a53d7a5d4b4743d9e886be1b05daa37d4c3fa47666f80e896eab14d4e3f43ecda5b4cbc3e2532ed85bfe019bc330bb743cefe6e1
|
7
|
+
data.tar.gz: 5534d3ca737011e1a97cd4b909377a31e58f287d782cb5c4f1e09e96a6369a12838896270b89609db07be532eb78195524129aa47626fe87024ad3975820e4f7
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@ que-scheduler
|
|
2
2
|
================
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/que-scheduler.svg)](https://badge.fury.io/rb/que-scheduler)
|
5
|
-
[![Build status](https://gitlab.com/hlascelles/que-scheduler/badges/master/pipeline.svg)](https://gitlab.com/hlascelles/que-scheduler/pipelines)
|
6
5
|
[![Coverage Status](https://coveralls.io/repos/github/hlascelles/que-scheduler/badge.svg?branch=master)](https://coveralls.io/github/hlascelles/que-scheduler?branch=master)
|
7
6
|
[![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/710d2fc5202f95d76e8a/maintainability)](https://codeclimate.com/github/hlascelles/que-scheduler/maintainability)
|
8
7
|
|
@@ -107,7 +106,7 @@ DailyBatchReport:
|
|
107
106
|
cron: "0 3 * * *"
|
108
107
|
# This job will be run every day at 03:00 as normal.
|
109
108
|
# However, the "schedule_type: every_event" setting below will ensure that if workers are offline
|
110
|
-
# for any amount of time then the
|
109
|
+
# for any amount of time then the backlog will always be enqueued on recovery.
|
111
110
|
# See "Schedule types" below for more information.
|
112
111
|
schedule_type: every_event
|
113
112
|
```
|
@@ -324,3 +323,4 @@ This gem was inspired by the makers of the excellent [Que](https://github.com/ch
|
|
324
323
|
* @joehorsnell
|
325
324
|
* @krzyzak
|
326
325
|
* @papodaca
|
326
|
+
* @ajoneil
|
@@ -36,7 +36,7 @@ module Que
|
|
36
36
|
# This will delete all but `retain_row_count` oldest rows
|
37
37
|
count = Que::Scheduler::VersionSupport.execute(DELETE_AUDIT_SQL, [retain_row_count])
|
38
38
|
log = "#{self.class} cleared down #{count.first.fetch(:count)} rows"
|
39
|
-
::Que.log(event: "que-scheduler"
|
39
|
+
::Que.log(event: :"que-scheduler", message: log)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -59,7 +59,7 @@ module Que
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def execute_step(number, direction)
|
62
|
-
sql =
|
62
|
+
sql = File.read("#{__dir__}/migrations/#{number}/#{direction}.sql")
|
63
63
|
Que::Scheduler::VersionSupport.execute(sql)
|
64
64
|
return unless audit_table_exists?
|
65
65
|
|
@@ -27,7 +27,7 @@ module Que
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def from_file(location)
|
30
|
-
from_yaml(
|
30
|
+
from_yaml(File.read(location))
|
31
31
|
end
|
32
32
|
|
33
33
|
def from_yaml(config)
|
@@ -36,10 +36,10 @@ module Que
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def from_hash(config_hash)
|
39
|
-
config_hash.
|
39
|
+
config_hash.to_h do |name, defined_job_hash|
|
40
40
|
name_str = name.to_s
|
41
41
|
[name_str, hash_item_to_defined_job(name_str, defined_job_hash)]
|
42
|
-
end
|
42
|
+
end
|
43
43
|
end
|
44
44
|
|
45
45
|
def hash_item_to_defined_job(name, defined_job_hash_in)
|
@@ -33,7 +33,7 @@ module Que
|
|
33
33
|
scheduler_job_args, scheduler_job_args.as_time, result.job_dictionary, enqueued_jobs
|
34
34
|
)
|
35
35
|
# Only now we're sure nothing errored, log the results
|
36
|
-
logs.each { |str| ::Que.log(event: "que-scheduler"
|
36
|
+
logs.each { |str| ::Que.log(event: :"que-scheduler", message: str) }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -50,11 +50,11 @@ module Que
|
|
50
50
|
def check_enqueued_job(to_enqueue, enqueued_job, logs)
|
51
51
|
logs << if enqueued_job.present?
|
52
52
|
"que-scheduler enqueueing #{enqueued_job.job_class} " \
|
53
|
-
|
53
|
+
"#{enqueued_job.job_id} with args: #{enqueued_job.args}"
|
54
54
|
else
|
55
55
|
# This can happen if a middleware nixes the enqueue call
|
56
56
|
"que-scheduler called enqueue on #{to_enqueue.job_class} " \
|
57
|
-
|
57
|
+
"but it reported no job was scheduled. Has `enqueue` been overridden?"
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: que-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Lascelles
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: '3'
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
56
|
+
version: '6'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: '3'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '6'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: que
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
version: '0.12'
|
74
74
|
- - "<="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.0.0.
|
76
|
+
version: 1.0.0.beta5
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
version: '0.12'
|
84
84
|
- - "<="
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: 1.0.0.
|
86
|
+
version: 1.0.0.beta5
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: activerecord
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,6 +91,9 @@ dependencies:
|
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '5.0'
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '7.0'
|
94
97
|
type: :development
|
95
98
|
prerelease: false
|
96
99
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -98,6 +101,9 @@ dependencies:
|
|
98
101
|
- - ">="
|
99
102
|
- !ruby/object:Gem::Version
|
100
103
|
version: '5.0'
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '7.0'
|
101
107
|
- !ruby/object:Gem::Dependency
|
102
108
|
name: appraisal
|
103
109
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,7 +147,7 @@ dependencies:
|
|
141
147
|
- !ruby/object:Gem::Version
|
142
148
|
version: '0'
|
143
149
|
- !ruby/object:Gem::Dependency
|
144
|
-
name:
|
150
|
+
name: coveralls_reborn
|
145
151
|
requirement: !ruby/object:Gem::Requirement
|
146
152
|
requirements:
|
147
153
|
- - ">="
|
@@ -210,6 +216,20 @@ dependencies:
|
|
210
216
|
- - ">="
|
211
217
|
- !ruby/object:Gem::Version
|
212
218
|
version: '0'
|
219
|
+
- !ruby/object:Gem::Dependency
|
220
|
+
name: psych
|
221
|
+
requirement: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - '='
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: 3.1.0
|
226
|
+
type: :development
|
227
|
+
prerelease: false
|
228
|
+
version_requirements: !ruby/object:Gem::Requirement
|
229
|
+
requirements:
|
230
|
+
- - '='
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 3.1.0
|
213
233
|
- !ruby/object:Gem::Dependency
|
214
234
|
name: rake
|
215
235
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,16 +276,16 @@ dependencies:
|
|
256
276
|
name: rubocop
|
257
277
|
requirement: !ruby/object:Gem::Requirement
|
258
278
|
requirements:
|
259
|
-
- -
|
279
|
+
- - ">="
|
260
280
|
- !ruby/object:Gem::Version
|
261
|
-
version:
|
281
|
+
version: '0'
|
262
282
|
type: :development
|
263
283
|
prerelease: false
|
264
284
|
version_requirements: !ruby/object:Gem::Requirement
|
265
285
|
requirements:
|
266
|
-
- -
|
286
|
+
- - ">="
|
267
287
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
288
|
+
version: '0'
|
269
289
|
- !ruby/object:Gem::Dependency
|
270
290
|
name: rubocop-rspec
|
271
291
|
requirement: !ruby/object:Gem::Requirement
|
@@ -368,7 +388,7 @@ metadata:
|
|
368
388
|
changelog_uri: https://github.com/hlascelles/que-scheduler/blob/master/CHANGELOG.md
|
369
389
|
source_code_uri: https://github.com/hlascelles/que-scheduler/
|
370
390
|
bug_tracker_uri: https://github.com/hlascelles/que-scheduler/issues
|
371
|
-
post_install_message:
|
391
|
+
post_install_message:
|
372
392
|
rdoc_options: []
|
373
393
|
require_paths:
|
374
394
|
- lib
|
@@ -376,15 +396,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
376
396
|
requirements:
|
377
397
|
- - ">="
|
378
398
|
- !ruby/object:Gem::Version
|
379
|
-
version: '
|
399
|
+
version: '0'
|
380
400
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
381
401
|
requirements:
|
382
402
|
- - ">="
|
383
403
|
- !ruby/object:Gem::Version
|
384
404
|
version: '0'
|
385
405
|
requirements: []
|
386
|
-
rubygems_version: 3.
|
387
|
-
signing_key:
|
406
|
+
rubygems_version: 3.2.7
|
407
|
+
signing_key:
|
388
408
|
specification_version: 4
|
389
409
|
summary: A cron scheduler for Que
|
390
410
|
test_files: []
|