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 +4 -4
- data/lib/say_when/storage/active_record_strategy.rb +5 -5
- data/lib/say_when/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 004f8130b1969d9e862595417d9794f7d64ed16afbdf34f40302334b8a942aa9
|
4
|
+
data.tar.gz: e91ef4b230b9c2b846be3c383dc8a2ed05fb818cf1545f9eec46be47da91fd40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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)
|
data/lib/say_when/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2022-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|