crono_trigger 0.5.3 → 0.5.4
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/crono_trigger/schedulable.rb +6 -1
- data/lib/crono_trigger/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: 414c7d5d5bc3a58298ef4cefaaf5dd23e12e6b2af43b2f269b77ddfa4460e3fa
|
|
4
|
+
data.tar.gz: 8004dcf5504db3f36c6e0548197842eaf3665cb1957ed8400c39338fc94b5539
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7de0e41900387c9c2f66e1df342645080e98d1058a39a7d4553dc9bd38625c640d2f48ccb360052bc31d614022a0c93bd1a08976d4b766f70c6fbf1de3d03133
|
|
7
|
+
data.tar.gz: e79b4255892a31cfe73bc673705605549b6ab687712e754d0aa790d45d4e09bc98006b86a52fac6901ad4e433951c15ae5f15ba71b88da60b6297884ee8db224
|
|
@@ -223,7 +223,11 @@ module CronoTrigger
|
|
|
223
223
|
crono_trigger_column_name(:locked_by) => CronoTrigger.config.worker_id
|
|
224
224
|
}.merge(attributes)
|
|
225
225
|
merge_updated_at_for_crono_trigger!(attributes)
|
|
226
|
-
|
|
226
|
+
if new_record?
|
|
227
|
+
self.attributes = attributes
|
|
228
|
+
else
|
|
229
|
+
update_columns(attributes)
|
|
230
|
+
end
|
|
227
231
|
end
|
|
228
232
|
|
|
229
233
|
def crono_trigger_unlock!
|
|
@@ -269,6 +273,7 @@ module CronoTrigger
|
|
|
269
273
|
|
|
270
274
|
def execute_now
|
|
271
275
|
crono_trigger_lock!(next_execute_at: Time.now)
|
|
276
|
+
save! if new_record?
|
|
272
277
|
do_execute
|
|
273
278
|
end
|
|
274
279
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crono_trigger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- joker1007
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chrono
|