crono_trigger 0.5.3 → 0.5.4

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: 2c770f49311e6809854f59f45982697afc9aed4f823e6eff9b488bcd8cf4a899
4
- data.tar.gz: 7237a80c08ec86def6d89811a2f9710f4e2a0135d4e5e405c248fecdf9ecfd7c
3
+ metadata.gz: 414c7d5d5bc3a58298ef4cefaaf5dd23e12e6b2af43b2f269b77ddfa4460e3fa
4
+ data.tar.gz: 8004dcf5504db3f36c6e0548197842eaf3665cb1957ed8400c39338fc94b5539
5
5
  SHA512:
6
- metadata.gz: 03cc1e2e116c6bfe32f098ebfb7e00af0f0c68c042728ea693bd82271386520d274706c7566bb27025a3633edbb947da997af9e1a569d23916342ebade74ee78
7
- data.tar.gz: 13ecaaf30e60299e1056393f9f29ecb1831af43432275e3c86a9a319cb2e9b30cbc344e9f7dab03e17e6c432dc2a7043adc00709e31a6dbffae0ef8cee141633
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
- update_columns(attributes)
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
 
@@ -1,3 +1,3 @@
1
1
  module CronoTrigger
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
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.3
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-09 00:00:00.000000000 Z
11
+ date: 2020-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chrono