Remove unused SubmissionsController#stop action
This commit is contained in:
@ -163,12 +163,11 @@ CodeOceanEditorSubmissions = {
|
||||
|
||||
runSubmission: function (submission) {
|
||||
//Run part starts here
|
||||
$('#stop').data('url', submission.stop_url);
|
||||
this.running = true;
|
||||
this.showSpinner($('#run'));
|
||||
$('#score_div').addClass('d-none');
|
||||
this.toggleButtonStates();
|
||||
var url = submission.run_url.replace(this.FILENAME_URL_PLACEHOLDER, CodeOceanEditor.active_file.filename.replace(/#$/,'')); // remove # if it is the last character, this is not part of the filename and just an anchor
|
||||
const url = submission.run_url.replace(this.FILENAME_URL_PLACEHOLDER, CodeOceanEditor.active_file.filename.replace(/#$/,'')); // remove # if it is the last character, this is not part of the filename and just an anchor
|
||||
this.initializeSocketForRunning(url);
|
||||
},
|
||||
|
||||
|
@ -412,16 +412,6 @@ class SubmissionsController < ApplicationController
|
||||
def statistics
|
||||
end
|
||||
|
||||
def stop
|
||||
Rails.logger.debug('stopping submission ' + @submission.id.to_s)
|
||||
container = Docker::Container.get(params[:container_id])
|
||||
DockerClient.destroy_container(container)
|
||||
rescue Docker::Error::NotFoundError => error
|
||||
Sentry.capture_exception(error)
|
||||
ensure
|
||||
head :ok
|
||||
end
|
||||
|
||||
def test
|
||||
hijack do |tubesock|
|
||||
unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?
|
||||
|
@ -1,7 +1,6 @@
|
||||
json.extract! @submission, :id, :files
|
||||
json.download_url download_submission_path(@submission, format: :json)
|
||||
json.score_url score_submission_path(@submission, format: :json)
|
||||
json.stop_url stop_submission_path(@submission, format: :json)
|
||||
json.download_file_url download_file_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')
|
||||
json.render_url render_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')
|
||||
json.run_url run_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')
|
||||
|
Reference in New Issue
Block a user