uv-rays 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uv-rays/scheduler.rb +8 -3
- data/lib/uv-rays/scheduler/cron.rb +4 -4
- data/lib/uv-rays/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62df253a515b6fc5dc5168365ffaccc6341e9432
|
4
|
+
data.tar.gz: 34ece239ae56c171c8a125656ba701b3fc66a9c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 714f784bf6f21ad6b8098c451564d775e9328bb0a21dc196dfdb9321b50ea31212ea2be292f20515540d5db5a38c93cbfe2ef993345dc4fbdece3a68a6f6ff03
|
7
|
+
data.tar.gz: c9f9ab7c2fef8a1c0ec1b948f1292f001fd1d2c03727d497ba013423e3dfa6d70bf7e6226a04ff3d9eb3467e3cb2ffcae727e3c9ac1886d745739176bc23fb18
|
data/lib/uv-rays/scheduler.rb
CHANGED
@@ -24,6 +24,11 @@ module UV
|
|
24
24
|
super(loop, defer)
|
25
25
|
end
|
26
26
|
|
27
|
+
# Provide relevant inspect information
|
28
|
+
def inspect
|
29
|
+
"#<#{self.class}:0x#{self.__id__.to_s(16)} next_scheduled=#{@next_scheduled} trigger_count=#{@trigger_count} last_scheduled=#{@last_scheduled} created=#{@created}>"
|
30
|
+
end
|
31
|
+
|
27
32
|
# required for comparable
|
28
33
|
def <=>(anOther)
|
29
34
|
@next_scheduled <=> anOther.next_scheduled
|
@@ -140,6 +145,7 @@ module UV
|
|
140
145
|
class Scheduler
|
141
146
|
attr_reader :loop
|
142
147
|
attr_reader :time_diff
|
148
|
+
attr_reader :next
|
143
149
|
|
144
150
|
|
145
151
|
def initialize(loop)
|
@@ -294,9 +300,8 @@ module UV
|
|
294
300
|
if in_time > 30
|
295
301
|
@timer.start(in_time)
|
296
302
|
else
|
297
|
-
|
298
|
-
|
299
|
-
end
|
303
|
+
# Effectively next tick
|
304
|
+
@timer.start(0)
|
300
305
|
end
|
301
306
|
end
|
302
307
|
end
|
@@ -124,11 +124,11 @@ module UV
|
|
124
124
|
|
125
125
|
time = @timezone ? @timezone.utc_to_local(from.getutc) : from
|
126
126
|
|
127
|
-
time = time.
|
128
|
-
|
127
|
+
time = time.round
|
128
|
+
# chop off subseconds
|
129
129
|
|
130
130
|
time = time + 1
|
131
|
-
|
131
|
+
# start at the next second
|
132
132
|
|
133
133
|
loop do
|
134
134
|
|
@@ -196,7 +196,7 @@ module UV
|
|
196
196
|
]
|
197
197
|
end
|
198
198
|
|
199
|
-
# Returns the shortest delta between two potential
|
199
|
+
# Returns the shortest delta between two potential occurrences of the
|
200
200
|
# schedule described by this cronline.
|
201
201
|
#
|
202
202
|
def frequency
|
data/lib/uv-rays/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uv-rays
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen von Takach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libuv
|