refinery 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/refinery/daemon.rb +1 -1
- data/lib/refinery/monitor.rb +3 -3
- data/refinery.gemspec +1 -1
- data/test/unit/daemon_test.rb +4 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.6
|
data/lib/refinery/daemon.rb
CHANGED
data/lib/refinery/monitor.rb
CHANGED
@@ -59,7 +59,7 @@ module Refinery #:nodoc:
|
|
59
59
|
rescue Exception => e
|
60
60
|
logger.error e
|
61
61
|
end
|
62
|
-
sleep(
|
62
|
+
sleep(5)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
@@ -82,7 +82,7 @@ module Refinery #:nodoc:
|
|
82
82
|
rescue Exception => e
|
83
83
|
logger.error e
|
84
84
|
end
|
85
|
-
sleep(
|
85
|
+
sleep(5)
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
@@ -106,7 +106,7 @@ module Refinery #:nodoc:
|
|
106
106
|
rescue Exception => e
|
107
107
|
logger.error e
|
108
108
|
end
|
109
|
-
sleep(
|
109
|
+
sleep(5)
|
110
110
|
end
|
111
111
|
end
|
112
112
|
end
|
data/refinery.gemspec
CHANGED
data/test/unit/daemon_test.rb
CHANGED
@@ -4,25 +4,27 @@ class DaemonTest < Test::Unit::TestCase
|
|
4
4
|
setup do
|
5
5
|
@server = stub('Server')
|
6
6
|
@waiting_queue = stub('Queue(waiting)')
|
7
|
-
@waiting_queue.stubs(:receive)
|
8
7
|
@error_queue = stub('Queue(error)')
|
9
8
|
@done_queue = stub('Queue(done)')
|
10
9
|
end
|
11
10
|
should "be startable" do
|
11
|
+
@waiting_queue.stubs(:receive)
|
12
12
|
assert_nothing_raised do
|
13
13
|
daemon = Refinery::Daemon.new(@server, 'sample', @waiting_queue, @error_queue, @done_queue)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
should "have logging" do
|
17
|
+
@waiting_queue.stubs(:receive)
|
17
18
|
daemon = Refinery::Daemon.new(@server, 'sample', @waiting_queue, @error_queue, @done_queue)
|
18
19
|
assert_not_nil daemon.logger
|
19
20
|
end
|
20
21
|
should "allow visibility setting" do
|
21
|
-
@waiting_queue.
|
22
|
+
@waiting_queue.expects(:receive).with(600)
|
22
23
|
daemon = Refinery::Daemon.new(@server, 'sample', @waiting_queue, @error_queue, @done_queue, {'visibility' => 600})
|
23
24
|
end
|
24
25
|
context "that is started" do
|
25
26
|
setup do
|
27
|
+
@waiting_queue.stubs(:receive)
|
26
28
|
@daemon = Refinery::Daemon.new(@server, 'sample', @waiting_queue, @error_queue, @done_queue)
|
27
29
|
end
|
28
30
|
should "have a state of running" do
|