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 +4 -4
- data/lib/gnomon.rb +3 -2
- data/lib/gnomon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82d9ec34dec0d37f31964d41ad3807ee8771b534
|
4
|
+
data.tar.gz: daee41b0fc9b8728b0682945d3d348be662d3f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 648a49ffc3594b17ca188ee4e59369a4c60119bd09d7e3e6e8f31bdac5644ef3e7615f9a9b2f1f1fb5026bbef19f18a40e7c70b04f10555911db670117ad450e
|
7
|
+
data.tar.gz: ae4f2fb9bac74dc63dd10a0402721a6ea7844bf3d64c4eda9265e957d3d5b8da38e98d0ac9c0ef308e9228f63fdb0a6c4abf8bfc207ce62842845bb8b218fba9
|
data/lib/gnomon.rb
CHANGED
@@ -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
|
data/lib/gnomon/version.rb
CHANGED