que-scheduler 0.10.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/que/scheduler/schedule_parser.rb +1 -12
- data/lib/que/scheduler/scheduler_job.rb +1 -4
- data/lib/que/scheduler/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: a243842a2035934a0aa1ee9d28f7620a376491b5
|
4
|
+
data.tar.gz: 43cc12d4246e4f74d32f17497fbe43957bc7a7af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f8398000dcd8cf65c1dff98928752fb58e9b548f05b6ea66eb3f2714fe7d58706b57d489a6719b944e1ec48b722c6fed73678e46e957c212ebef5b49b2e7a4c
|
7
|
+
data.tar.gz: baff4c34fce9a3bd4649e32490bc47a7b409d22871f8e0f57fe02432657fad0861e89650cc153deae3d1b39304d6bc66cae1e645618db170e2903595de214a38
|
data/README.md
CHANGED
@@ -76,8 +76,8 @@ all_args_job:
|
|
76
76
|
# Ensure you never miss a job, even after downtime
|
77
77
|
DailyBatchReport:
|
78
78
|
cron: "0 3 * * *"
|
79
|
-
# This job will be run every day
|
80
|
-
# will all be scheduled when they are restored, each with that
|
79
|
+
# This job will be run every day. If workers are offline for several days, then the backlog
|
80
|
+
# will all be scheduled when they are restored, each with that event's timestamp as the first arg.
|
81
81
|
schedule_type: every_event
|
82
82
|
```
|
83
83
|
|
@@ -90,7 +90,7 @@ A job can have a `schedule_type` assigned to it. Valid values are:
|
|
90
90
|
how ordinary cron works.
|
91
91
|
1. `every_event` - This job will always be scheduled with an ISO8601 time as the first argument.
|
92
92
|
If multiple cron times go by during an extended period of downtime, then a job will be scheduled
|
93
|
-
for every one missed. This schedule_type should be used for daily batch jobs that need to know
|
93
|
+
for every one missed. This `schedule_type` should be used for daily batch jobs that need to know
|
94
94
|
which day they are running a batch for.
|
95
95
|
|
96
96
|
## Environment Variables
|
@@ -20,22 +20,11 @@ module Que
|
|
20
20
|
args: v['args'],
|
21
21
|
priority: v['priority'],
|
22
22
|
cron: v['cron'],
|
23
|
-
schedule_type: schedule_type
|
23
|
+
schedule_type: v['schedule_type'] || DefinedJob::SCHEDULE_TYPE_DEFAULT
|
24
24
|
}.compact
|
25
25
|
)
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
# Migrate legacy config that used the `unmissable` config key.
|
32
|
-
def schedule_type(v)
|
33
|
-
if v['unmissable']
|
34
|
-
DefinedJob::SCHEDULE_TYPE_EVERY_EVENT
|
35
|
-
else
|
36
|
-
v['schedule_type'] || DefinedJob::SCHEDULE_TYPE_DEFAULT
|
37
|
-
end
|
38
|
-
end
|
39
28
|
end
|
40
29
|
end
|
41
30
|
end
|
@@ -13,10 +13,7 @@ module Que
|
|
13
13
|
# Highest possible priority.
|
14
14
|
@priority = 0
|
15
15
|
|
16
|
-
def run(options = nil
|
17
|
-
# Early versions took separate args. We now just pass in a hash.
|
18
|
-
options = { last_run_time: options, job_dictionary: oldarg } if oldarg.present?
|
19
|
-
|
16
|
+
def run(options = nil)
|
20
17
|
::ActiveRecord::Base.transaction do
|
21
18
|
assert_one_scheduler_job
|
22
19
|
scheduler_job_args = SchedulerJobArgs.prepare_scheduler_job_args(options)
|
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: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Lascelles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|