make sure pending results respond to failures

This commit is contained in:
John Bintz 2012-04-17 11:54:32 -04:00
parent 985634331f
commit 58ebd113ba
2 changed files with 13 additions and 5 deletions

View File

@ -7,6 +7,8 @@ module Flowerbox::Result
def failure?
false
end
def failures; [] ; end
end
end

View File

@ -47,6 +47,7 @@ module Flowerbox
ws.onmessage { |message|
command, data = JSON.parse(message)
begin
output = runner.send(command, [ data ].flatten)
if command == 'load'
@ -54,6 +55,11 @@ module Flowerbox
else
ws.send("ok")
end
rescue => e
$stderr.puts e.message
exit 1
end
}
end