gnomon 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: e06c5f24a59beb7089abdb300cb8c79eacead7c5
4
- data.tar.gz: 24e69f2f119e4ad5911f3ca3d1683b350137911f
3
+ metadata.gz: 82d9ec34dec0d37f31964d41ad3807ee8771b534
4
+ data.tar.gz: daee41b0fc9b8728b0682945d3d348be662d3f4e
5
5
  SHA512:
6
- metadata.gz: b37b65fb344ce290f776eed2868e1909e7e53b64cade4c9ed907de63123d195cbf36921d14df622aead18a02587dc35576e6e6f013dba5f21817d9bd28da8152
7
- data.tar.gz: 1f498ce89ee92a6298c986b4cd53ec058cb80ad8ee8be7b333ce224497eb9b5e9ad5343fe941f715e87173f979db0bd6d9c6eed40498d67adc66ba56252e5cd7
6
+ metadata.gz: 648a49ffc3594b17ca188ee4e59369a4c60119bd09d7e3e6e8f31bdac5644ef3e7615f9a9b2f1f1fb5026bbef19f18a40e7c70b04f10555911db670117ad450e
7
+ data.tar.gz: ae4f2fb9bac74dc63dd10a0402721a6ea7844bf3d64c4eda9265e957d3d5b8da38e98d0ac9c0ef308e9228f63fdb0a6c4abf8bfc207ce62842845bb8b218fba9
@@ -84,6 +84,7 @@ class Gnomon
84
84
 
85
85
  # De-queue any next run
86
86
  @equeue.delete_if { |e| e[:event][:id] == id } unless keep_running
87
+ @equeue.each { |e| e[:event][:last_run] = true if e[:event][:id] == id } if keep_running
87
88
  end
88
89
  end
89
90
 
@@ -135,13 +136,13 @@ class Gnomon
135
136
  @equeue.delete_if { |e| e[:event] == event } unless event[:mode] == :every
136
137
 
137
138
  # Enqueue next run BEFORE calling block for asynchronous periodic events
138
- enqueue_next_run event if event[:mode] == :every && event[:mopt][:async]
139
+ enqueue_next_run event if event[:mode] == :every && event[:mopt][:async] && !(event[:last_run])
139
140
 
140
141
  # Pass Event Args to Event Block
141
142
  event[:blck].call *(event[:args])
142
143
 
143
144
  # Enqueue next run AFTER calling block for synchronous periodic events
144
- enqueue_next_run event if event[:mode] == :every && !(event[:mopt][:async])
145
+ enqueue_next_run event if event[:mode] == :every && !(event[:mopt][:async]) && !(event[:last_run])
145
146
  end
146
147
  end
147
148
  end
@@ -5,5 +5,5 @@
5
5
  class Gnomon
6
6
 
7
7
  # Version
8
- VERSION = '0.1.1'
8
+ VERSION = '0.1.2'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gnomon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse