send exit commands from rails server when score or test have finished - this is needed to reset the buttons in the frontend correctly.
This commit is contained in:
@ -232,6 +232,7 @@ class SubmissionsController < ApplicationController
|
||||
Thread.new { EventMachine.run } unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?
|
||||
# tubesock is the socket to the client
|
||||
tubesock.send_data JSON.dump(score_submission(@submission))
|
||||
tubesock.send_data JSON.dump({'cmd' => 'exit'})
|
||||
end
|
||||
end
|
||||
|
||||
@ -291,6 +292,7 @@ class SubmissionsController < ApplicationController
|
||||
|
||||
# tubesock is the socket to the client
|
||||
tubesock.send_data JSON.dump(output)
|
||||
tubesock.send_data JSON.dump('cmd' => 'exit')
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user