que-scheduler 3.4.2 → 3.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/lib/que/scheduler/schedule.rb +13 -2
- data/lib/que/scheduler/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ba02202915db229bcbd1c2e859f29299803507dbf61bd460008400abca3611c
|
4
|
+
data.tar.gz: 6293d7b6e6766d0e75fe65df01850f356b44b030c8b8ae539eb4c71059d9d15d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8d18550867d7d54cfb5c03aaa68876d423876a870b972cde0fbc4e8399fb616d327ef0410ebbc8e3d9021a34d73a960774eabb808f2b33a526e11ea2fb579fe
|
7
|
+
data.tar.gz: bfc0e4be1f64d2b070dacb0863cc710ce13cf58cb30924fcf9f301d2e535be4ef9530740949bdb5abb90c0173924e71f7f151e4622405caf8c14a9d7d6f0469d
|
data/README.md
CHANGED
@@ -18,9 +18,9 @@ needs to be run, enqueueing those jobs, then enqueueing itself to check again la
|
|
18
18
|
```ruby
|
19
19
|
gem 'que-scheduler'
|
20
20
|
```
|
21
|
-
1. Specify a schedule in a yml file (see below). The default location that
|
22
|
-
look for it is `config/que_schedule.yml`.
|
23
|
-
files, but with additional features.
|
21
|
+
1. Specify a schedule in a yml file or programmatically (see below). The default location that
|
22
|
+
que-scheduler will look for it is `config/que_schedule.yml`. The format is essentially the same as
|
23
|
+
resque-scheduler files, but with additional features.
|
24
24
|
|
25
25
|
1. Add a migration to start the job scheduler and prepare the audit table. Note that this migration
|
26
26
|
will fail if Que is set to execute jobs synchronously, i.e. `Que::Job.run_synchronously = true`.
|
@@ -35,7 +35,11 @@ files, but with additional features.
|
|
35
35
|
|
36
36
|
## Schedule configuration
|
37
37
|
|
38
|
-
The schedule file
|
38
|
+
The schedule file should be placed here: `config/que_schedule.yml`. Alternatively if you
|
39
|
+
wish to generate the configuration dynamically, you can set it directly with
|
40
|
+
`Que::Scheduler.schedule = some_hash`.
|
41
|
+
|
42
|
+
The file is a list of que job classes with arguments and a schedule frequency (in crontab
|
39
43
|
syntax). The format is similar to the resque-scheduler format, though priorities must be supplied as
|
40
44
|
integers, and job classes must be migrated from Resque to Que. Cron syntax can be anything
|
41
45
|
understood by [fugit](https://github.com/floraison/fugit#fugitcron).
|
@@ -278,3 +282,4 @@ This gem was inspired by the makers of the excellent [Que](https://github.com/ch
|
|
278
282
|
* @bnauta
|
279
283
|
* @papodaca
|
280
284
|
* @krzyzak
|
285
|
+
* @JackDanger
|
@@ -12,9 +12,16 @@ module Que
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
def schedule=(schedule_config)
|
16
|
+
@schedule = schedule_config.nil? ? nil : from_yaml(schedule_config)
|
17
|
+
end
|
18
|
+
|
15
19
|
def from_file(location)
|
16
|
-
|
17
|
-
|
20
|
+
from_yaml(IO.read(location))
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_yaml(config)
|
24
|
+
config_hash = YAML.safe_load(config)
|
18
25
|
from_hash(config_hash)
|
19
26
|
end
|
20
27
|
|
@@ -62,6 +69,10 @@ module Que
|
|
62
69
|
def schedule
|
63
70
|
Schedule.schedule
|
64
71
|
end
|
72
|
+
|
73
|
+
def schedule=(value)
|
74
|
+
Schedule.schedule = value
|
75
|
+
end
|
65
76
|
end
|
66
77
|
end
|
67
78
|
end
|
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: 3.4.
|
4
|
+
version: 3.4.3
|
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: 2020-
|
11
|
+
date: 2020-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -351,7 +351,7 @@ metadata:
|
|
351
351
|
changelog_uri: https://github.com/hlascelles/que-scheduler/blob/master/CHANGELOG.md
|
352
352
|
source_code_uri: https://github.com/hlascelles/que-scheduler/
|
353
353
|
bug_tracker_uri: https://github.com/hlascelles/que-scheduler/issues
|
354
|
-
post_install_message:
|
354
|
+
post_install_message:
|
355
355
|
rdoc_options: []
|
356
356
|
require_paths:
|
357
357
|
- lib
|
@@ -367,7 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
367
367
|
version: '0'
|
368
368
|
requirements: []
|
369
369
|
rubygems_version: 3.0.3
|
370
|
-
signing_key:
|
370
|
+
signing_key:
|
371
371
|
specification_version: 4
|
372
372
|
summary: A cron scheduler for Que
|
373
373
|
test_files: []
|