que-scheduler 4.2.2 → 4.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e73846d81092ac0bacd4a3c854a3610bde40c8c4a5289728f42b59a5ef7833bf
4
- data.tar.gz: 01e41964ee78f56cf90836457a5f439d0bc5185466890e5fcbbcbe4e77306041
3
+ metadata.gz: 3031c76424c60291dc8d004538ab6dc5d57fdf8bb7c48faa6dae2cd2ddba90f7
4
+ data.tar.gz: 0c3d33ade4ebce0c2e24414347da1a5150d5ba680adafa240a15475a71ba646b
5
5
  SHA512:
6
- metadata.gz: 49bd076fb802ef81ad445d4dd668bd144a0d313aeee04988cb5bae8ebd9061955ac19c30efe46085f7453bb6dfd20f04b63c4225f6360407a46afefc8b833391
7
- data.tar.gz: 1d4074dda7344d003140ed4b2e513702ffc8386620d236df8602a660f1fa1209d5f324d4f840bb17434b7164f5785b02d93ee4cfef08c2e055625ec675634fe8
6
+ metadata.gz: c6c0bdefa899496a741b4c4b059cdc7663299a4a349b41560c44d77d2c788bc3ee4fb53f7c8fa51767d86332f1bd5475ea3bca3516ddd1a81de1bfea91e2e653
7
+ data.tar.gz: 447ff26a1c104803e27da593730b77aaf59300e13ead005c7dece366c1fbc0f252d65524dcba6b6a64be2a656681a97e1ae78adb45117b374b533525e2612b6a
data/README.md CHANGED
@@ -27,7 +27,7 @@ resque-scheduler files, but with additional features.
27
27
  ```ruby
28
28
  class CreateQueSchedulerSchema < ActiveRecord::Migration
29
29
  def change
30
- Que::Scheduler::Migrations.migrate!(version: 6)
30
+ Que::Scheduler::Migrations.migrate!(version: 7)
31
31
  end
32
32
  end
33
33
  ```
@@ -211,7 +211,7 @@ performed.
211
211
  ```ruby
212
212
  class CreateQueSchedulerSchema < ActiveRecord::Migration
213
213
  def change
214
- Que::Scheduler::Migrations.migrate!(version: 6)
214
+ Que::Scheduler::Migrations.migrate!(version: 7)
215
215
  end
216
216
  end
217
217
  ```
@@ -310,13 +310,15 @@ 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.
313
+ The latest version of que-scheduler supports Ruby 2.7, though this is largely to allow
314
+ the gem to work with que 2.x. Recent que-scheduler versions (up to 4.2.2) work with Ruby 2.5.
315
+
316
+ Ruby 3.x support (and thus que 2.x support) is currently in beta.
314
317
 
315
318
  Using que 0.x with Rails 6 needs a patch to support it.
316
319
  See the patch and how to use it here: https://github.com/que-rb/que/issues/247#issuecomment-595258236
317
320
  If that patch is included then que-scheduler will work. This setup is tested, but is not supported.
318
321
 
319
-
320
322
  ## Inspiration
321
323
 
322
324
  This gem was inspired by the makers of the excellent [Que](https://github.com/chanks/que) job scheduler gem.
@@ -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 prevented. Deleting the que_scheduler job is almost certainly a mistake.';
16
+ raise exception 'Deletion of que_scheduler job % prevented. Deleting the que_scheduler job is almost certainly a mistake.', OLD.job_id;
17
17
  END IF;
18
18
  END IF;
19
19
  RETURN OLD;
@@ -0,0 +1,13 @@
1
+ CREATE OR REPLACE FUNCTION que_scheduler_prevent_job_deletion() RETURNS TRIGGER AS
2
+ $BODY$
3
+ DECLARE
4
+ BEGIN
5
+ IF OLD.job_class = 'Que::Scheduler::SchedulerJob' THEN
6
+ IF NOT que_scheduler_check_job_exists() THEN
7
+ raise exception 'Deletion of que_scheduler job % prevented. Deleting the que_scheduler job is almost certainly a mistake.', OLD.job_id;
8
+ END IF;
9
+ END IF;
10
+ RETURN OLD;
11
+ END;
12
+ $BODY$
13
+ LANGUAGE 'plpgsql';
@@ -0,0 +1,13 @@
1
+ CREATE OR REPLACE FUNCTION que_scheduler_prevent_job_deletion() RETURNS TRIGGER AS
2
+ $BODY$
3
+ DECLARE
4
+ BEGIN
5
+ IF OLD.job_class = 'Que::Scheduler::SchedulerJob' THEN
6
+ IF NOT que_scheduler_check_job_exists() THEN
7
+ raise exception 'Deletion of que_scheduler job prevented. Deleting the que_scheduler job is almost certainly a mistake.';
8
+ END IF;
9
+ END IF;
10
+ RETURN OLD;
11
+ END;
12
+ $BODY$
13
+ LANGUAGE 'plpgsql';
@@ -1,5 +1,5 @@
1
1
  module Que
2
2
  module Scheduler
3
- VERSION = "4.2.2".freeze
3
+ VERSION = "4.3.0".freeze
4
4
  end
5
5
  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.2
4
+ version: 4.3.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: 2022-02-23 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -70,7 +70,7 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: '0.12'
73
+ version: '0.14'
74
74
  - - "<="
75
75
  - !ruby/object:Gem::Version
76
76
  version: 2.0.0
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: '0.12'
83
+ version: '0.14'
84
84
  - - "<="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 2.0.0
@@ -371,6 +371,8 @@ files:
371
371
  - lib/que/scheduler/migrations/5/up.sql
372
372
  - lib/que/scheduler/migrations/6/down.sql
373
373
  - lib/que/scheduler/migrations/6/up.sql
374
+ - lib/que/scheduler/migrations/7/down.sql
375
+ - lib/que/scheduler/migrations/7/up.sql
374
376
  - lib/que/scheduler/schedule.rb
375
377
  - lib/que/scheduler/scheduler_job.rb
376
378
  - lib/que/scheduler/scheduler_job_args.rb
@@ -397,7 +399,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
397
399
  requirements:
398
400
  - - ">="
399
401
  - !ruby/object:Gem::Version
400
- version: '0'
402
+ version: '2.7'
401
403
  required_rubygems_version: !ruby/object:Gem::Requirement
402
404
  requirements:
403
405
  - - ">="