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?
|
def failure?
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def failures; [] ; end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,12 +47,18 @@ module Flowerbox
|
|||||||
ws.onmessage { |message|
|
ws.onmessage { |message|
|
||||||
command, data = JSON.parse(message)
|
command, data = JSON.parse(message)
|
||||||
|
|
||||||
output = runner.send(command, [ data ].flatten)
|
begin
|
||||||
|
output = runner.send(command, [ data ].flatten)
|
||||||
|
|
||||||
if command == 'load'
|
if command == 'load'
|
||||||
ws.send(output)
|
ws.send(output)
|
||||||
else
|
else
|
||||||
ws.send("ok")
|
ws.send("ok")
|
||||||
|
end
|
||||||
|
rescue => e
|
||||||
|
$stderr.puts e.message
|
||||||
|
|
||||||
|
exit 1
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user