que-scheduler 4.2.1 → 4.2.2
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 +8 -0
- data/lib/que/scheduler/defined_job.rb +1 -1
- data/lib/que/scheduler/migrations/6/up.sql +1 -1
- data/lib/que/scheduler/schedule.rb +3 -4
- data/lib/que/scheduler/to_enqueue.rb +3 -3
- data/lib/que/scheduler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e73846d81092ac0bacd4a3c854a3610bde40c8c4a5289728f42b59a5ef7833bf
|
4
|
+
data.tar.gz: 01e41964ee78f56cf90836457a5f439d0bc5185466890e5fcbbcbe4e77306041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49bd076fb802ef81ad445d4dd668bd144a0d313aeee04988cb5bae8ebd9061955ac19c30efe46085f7453bb6dfd20f04b63c4225f6360407a46afefc8b833391
|
7
|
+
data.tar.gz: 1d4074dda7344d003140ed4b2e513702ffc8386620d236df8602a660f1fa1209d5f324d4f840bb17434b7164f5785b02d93ee4cfef08c2e055625ec675634fe8
|
data/README.md
CHANGED
@@ -310,6 +310,13 @@ A full changelog can be found here: [CHANGELOG.md](https://github.com/hlascelles
|
|
310
310
|
|
311
311
|
Your [postgres](https://www.postgresql.org/) database must be at least version 9.5.0.
|
312
312
|
|
313
|
+
Ruby 2.6 and above is supported. Ruby 2.5 currently still currently works but is unsupported.
|
314
|
+
|
315
|
+
Using que 0.x with Rails 6 needs a patch to support it.
|
316
|
+
See the patch and how to use it here: https://github.com/que-rb/que/issues/247#issuecomment-595258236
|
317
|
+
If that patch is included then que-scheduler will work. This setup is tested, but is not supported.
|
318
|
+
|
319
|
+
|
313
320
|
## Inspiration
|
314
321
|
|
315
322
|
This gem was inspired by the makers of the excellent [Que](https://github.com/chanks/que) job scheduler gem.
|
@@ -324,3 +331,4 @@ This gem was inspired by the makers of the excellent [Que](https://github.com/ch
|
|
324
331
|
* @krzyzak
|
325
332
|
* @papodaca
|
326
333
|
* @ajoneil
|
334
|
+
* @ippachi
|
@@ -86,7 +86,7 @@ module Que
|
|
86
86
|
# queue name is only supported for a subrange of ActiveJob versions. Print this out as a
|
87
87
|
# warning.
|
88
88
|
if queue &&
|
89
|
-
Que::Scheduler::ToEnqueue.
|
89
|
+
Que::Scheduler::ToEnqueue.active_job_defined? &&
|
90
90
|
job_class < ::ActiveJob::Base &&
|
91
91
|
Que::Scheduler::ToEnqueue.active_job_version < Gem::Version.create("6.0.3")
|
92
92
|
puts <<~ERR
|
@@ -13,7 +13,7 @@ DECLARE
|
|
13
13
|
BEGIN
|
14
14
|
IF OLD.job_class = 'Que::Scheduler::SchedulerJob' THEN
|
15
15
|
IF NOT que_scheduler_check_job_exists() THEN
|
16
|
-
raise exception 'Deletion of que_scheduler job
|
16
|
+
raise exception 'Deletion of que_scheduler job prevented. Deleting the que_scheduler job is almost certainly a mistake.';
|
17
17
|
END IF;
|
18
18
|
END IF;
|
19
19
|
RETURN OLD;
|
@@ -36,10 +36,9 @@ module Que
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def from_hash(config_hash)
|
39
|
-
config_hash
|
40
|
-
|
41
|
-
|
42
|
-
end
|
39
|
+
config_hash
|
40
|
+
.map { |name, defined_job_hash| hash_item_to_defined_job(name.to_s, defined_job_hash) }
|
41
|
+
.index_by(&:name)
|
43
42
|
end
|
44
43
|
|
45
44
|
def hash_item_to_defined_job(name, defined_job_hash_in)
|
@@ -22,8 +22,8 @@ module Que
|
|
22
22
|
type_from_job_class(job_class).present?
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
26
|
-
|
25
|
+
def active_job_defined?
|
26
|
+
Object.const_defined?("ActiveJob")
|
27
27
|
end
|
28
28
|
|
29
29
|
def active_job_version
|
@@ -54,7 +54,7 @@ module Que
|
|
54
54
|
hash = {
|
55
55
|
::Que::Job => QueJobType,
|
56
56
|
}
|
57
|
-
hash[::ActiveJob::Base] = ActiveJobType if ToEnqueue.
|
57
|
+
hash[::ActiveJob::Base] = ActiveJobType if ToEnqueue.active_job_defined?
|
58
58
|
hash
|
59
59
|
end
|
60
60
|
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: 4.2.
|
4
|
+
version: 4.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Lascelles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -404,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
404
|
- !ruby/object:Gem::Version
|
405
405
|
version: '0'
|
406
406
|
requirements: []
|
407
|
-
rubygems_version: 3.
|
407
|
+
rubygems_version: 3.1.6
|
408
408
|
signing_key:
|
409
409
|
specification_version: 4
|
410
410
|
summary: A cron scheduler for Que
|