que-scheduler 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78c9bc8d137dbe8a7c2428e50c615928c5d702d06432763b5346030fcbe81d5b
4
- data.tar.gz: 3e639fd3f2263266fa25e25c637390f718e7751726feaefaa63f69cc91124f2d
3
+ metadata.gz: 198960bfd5797bdc85e0b320170350bb3a752e5c4ed90db31b86cf040b5dbd92
4
+ data.tar.gz: 3f7128c8d159d5007ae42e72eca65059fd5e3f7cc9d60706dd72d7ea5002e686
5
5
  SHA512:
6
- metadata.gz: b599d23b38d8263412e2a1fa7eb6621f564a628ae7b66800b0259667a76956e0a9e16824bd463a24edd0752119f30ec01ac3a1951e1d4abfc1d05ed1905745dc
7
- data.tar.gz: 42691328a2727e14f15305e6baac0f0d7b3e4cb1d1a91c80d2ef1f7ab42db56e3bd1640884805adf381d65fbe2d6b3d7abbe2373e8ef49dfbeb737f790b76700
6
+ metadata.gz: db16c38be02a29d413687a3faaffd7749a88ca141bfcee724b0f1c410ddb4094ca6b92c73c878250d088cbaec5242dd8b755d3d3bf44dacd80dd921b710eb9bd
7
+ data.tar.gz: fd46b785a759e3435491e54015d7ffff61bcf8ad5b0bd782a505838c148e9c778d6c994aaad71697cbe815bd47dffa22dcc3e35de8dc312eebbcc85a2752e26a
data/README.md CHANGED
@@ -220,6 +220,15 @@ The changes in past migrations were:
220
220
  | 5 | Dropped an unnecessary index |
221
221
  | 6 | Enforced single scheduler job at the trigger level |
222
222
 
223
+ The changes to the DB ([DDL](https://en.wikipedia.org/wiki/Data_definition_language)) are all
224
+ captured in the structure.sql so will be re-run in correctly if squashed - except for the actual
225
+ scheduling of the job itself (as that is [DML](https://en.wikipedia.org/wiki/Data_manipulation_language)).
226
+ If you squash your migrations make sure this is added as the final line:
227
+
228
+ ```ruby
229
+ Que::Scheduler::Migrations.reenqueue_scheduler_if_missing
230
+ ```
231
+
223
232
  ## HA Redundancy and DB restores
224
233
 
225
234
  Because of the way que-scheduler works, it requires no additional processes. It is, itself, a Que job.
@@ -41,6 +41,11 @@ module Que
41
41
  result.any?
42
42
  end
43
43
 
44
+ # This method is only intended for use in squashed migrations
45
+ def reenqueue_scheduler_if_missing
46
+ Que::Scheduler::SchedulerJob.enqueue if Que::Scheduler::Db.count_schedulers.zero?
47
+ end
48
+
44
49
  private
45
50
 
46
51
  def migrate_up(current, version)
@@ -1,5 +1,5 @@
1
1
  module Que
2
2
  module Scheduler
3
- VERSION = "4.0.1".freeze
3
+ VERSION = "4.0.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: que-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Lascelles