say_when 2.2.0 → 2.2.1

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: 6a15986d3be49bd5a4df5bfba2efb10a6e87bb385dae3db7302a26998f6cc784
4
- data.tar.gz: fd26b203f07e779d0f663c0650efe525f337ceb3567fdcc73aa8512bca42247f
3
+ metadata.gz: 004f8130b1969d9e862595417d9794f7d64ed16afbdf34f40302334b8a942aa9
4
+ data.tar.gz: e91ef4b230b9c2b846be3c383dc8a2ed05fb818cf1545f9eec46be47da91fd40
5
5
  SHA512:
6
- metadata.gz: 25b2394bb39c4ed8fcd0955ecc17dba6c1c45caabfb5b3c0703e58f941adc7661356c2a103a315d5baa740fa6142ac6519eacda35ac062b9f4498607de9eeef4
7
- data.tar.gz: 128ca1ff31b19f594075e1a671f321f8f62aad440d2708afeb6d727179b6909eaac085acbcac6129c7e5f2f3e59632b167577699aefacd0f5d87b38a86f554cc
6
+ metadata.gz: a00b44161859bc4f2c526e724bee7037dcdead017e08c183c80ca0cb30f13ec8eee631f69d6734bfcc7ecf0dee32fe388cec1852d2b31892d17ad210ee00789d
7
+ data.tar.gz: 196771d5723fbf2b077ad93fa6ab7e2c8b5923d55090523d38e72e860ba1cce0d3b71938afbf3ce409a260e0022604394401c5db7fb6dc91113cd70d3468af39
@@ -47,7 +47,7 @@ module SayWhen
47
47
  serialize :trigger_options
48
48
  serialize :data
49
49
 
50
- belongs_to :scheduled, polymorphic: true
50
+ belongs_to :scheduled, polymorphic: true, optional: true
51
51
  has_many :job_executions, class_name: 'SayWhen::Storage::ActiveRecordStrategy::JobExecution'
52
52
 
53
53
  before_create :set_defaults
@@ -73,10 +73,10 @@ module SayWhen
73
73
  SayWhen::Storage::ActiveRecordStrategy::Job.transaction do
74
74
  # select and lock the next job that needs executing (status waiting, and after no_later_than)
75
75
  next_job = where(status: STATE_WAITING)
76
- .where('next_fire_at < ?', no_later_than)
77
- .order(next_fire_at: 'asc')
78
- .lock(true)
79
- .first
76
+ .where('next_fire_at < ?', no_later_than)
77
+ .order(next_fire_at: 'asc')
78
+ .lock(true)
79
+ .first
80
80
 
81
81
  # set status to acquired to take it out of rotation
82
82
  next_job&.update_attribute(:status, STATE_ACQUIRED)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SayWhen
4
- VERSION = '2.2.0'
4
+ VERSION = '2.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: say_when
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-05 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport