make sure pending results respond to failures
This commit is contained in:
parent
985634331f
commit
58ebd113ba
@ -7,6 +7,8 @@ module Flowerbox::Result
|
||||
def failure?
|
||||
false
|
||||
end
|
||||
|
||||
def failures; [] ; end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -47,12 +47,18 @@ module Flowerbox
|
||||
ws.onmessage { |message|
|
||||
command, data = JSON.parse(message)
|
||||
|
||||
output = runner.send(command, [ data ].flatten)
|
||||
begin
|
||||
output = runner.send(command, [ data ].flatten)
|
||||
|
||||
if command == 'load'
|
||||
ws.send(output)
|
||||
else
|
||||
ws.send("ok")
|
||||
if command == 'load'
|
||||
ws.send(output)
|
||||
else
|
||||
ws.send("ok")
|
||||
end
|
||||
rescue => e
|
||||
$stderr.puts e.message
|
||||
|
||||
exit 1
|
||||
end
|
||||
}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user