emrb 0.1.3 → 0.1.5
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/example/http/Gemfile.lock +1 -1
- data/example/push/Gemfile.lock +1 -1
- data/lib/emrb/instruments/instruments.rb +13 -0
- data/lib/emrb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa17883fa71ca2c1720abf5ba7c5f7fed7a585f366eba2ec9993a01298da5128
|
4
|
+
data.tar.gz: 88ed014edcb64f0c4fac48ed9d745f59f4bceb1d02b98a5752f1d19dccf69a99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ffc8b4b608c7fd0254767036fc22bace80fe7d8219d5f8b875167e7dbb69b5b4b695b7f5c5012e14429b68adc037f7c0250ae545e9a4378cccfd8ec3931b4db
|
7
|
+
data.tar.gz: d7610d3f9e17b1ca7311090ec57eb3d283f02f0d4b30cb8d60bc5928ead44b5863644e46b534e60067811d28978794757dc8ce16a100932b9a351cf79d092454
|
data/example/http/Gemfile.lock
CHANGED
data/example/push/Gemfile.lock
CHANGED
@@ -176,6 +176,19 @@ module Emrb
|
|
176
176
|
# end
|
177
177
|
def push(job, **) = State.push(job, **)
|
178
178
|
|
179
|
+
# Periodically invokes #push in a given frequency.
|
180
|
+
#
|
181
|
+
# job - Job identifier
|
182
|
+
# frequency - Frequency, in seconds, in which #push will be called.
|
183
|
+
#
|
184
|
+
# Returns nothing.
|
185
|
+
def push_periodically(job, frequency = 10, **)
|
186
|
+
Thread.new do
|
187
|
+
sleep(frequency)
|
188
|
+
push(job, **)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
179
192
|
# Allows instruments to be declared with preset labels.
|
180
193
|
#
|
181
194
|
# labels - A hash containing the preset labels and values
|
data/lib/emrb/version.rb
CHANGED