Exclusively lock Runners during code executions
Previously, the same runner could be used multiple times with different submissions simultaneously. This, however, yielded errors, for example when one submission time oud (causing the running to be deleted) while another submission was still executed. Admin actions, such as the shell, can be still executed regardless of any other code execution. Fixes CODEOCEAN-HG Fixes openHPI/poseidon#423
This commit is contained in:

committed by
Sebastian Serth

parent
427b54d306
commit
8fc5123bae
@ -773,6 +773,8 @@ var CodeOceanEditor = {
|
||||
this.showContainerDepletedMessage();
|
||||
} else if (output.status === 'out_of_memory') {
|
||||
this.showOutOfMemoryMessage();
|
||||
} else if (output.status === 'runner_in_use') {
|
||||
this.showRunnerInUseMessage();
|
||||
}
|
||||
},
|
||||
|
||||
@ -832,6 +834,13 @@ var CodeOceanEditor = {
|
||||
});
|
||||
},
|
||||
|
||||
showRunnerInUseMessage: function () {
|
||||
$.flash.warning({
|
||||
icon: ['fa-solid', 'fa-triangle-exclamation'],
|
||||
text: I18n.t('exercises.editor.runner_in_use')
|
||||
});
|
||||
},
|
||||
|
||||
showTimeoutMessage: function () {
|
||||
$.flash.info({
|
||||
icon: ['fa-regular', 'fa-clock'],
|
||||
|
@ -109,6 +109,11 @@ CodeOceanEditorEvaluation = {
|
||||
})) {
|
||||
this.showOutOfMemoryMessage();
|
||||
}
|
||||
if (_.some(response, function (result) {
|
||||
return result.status === 'runner_in_use';
|
||||
})) {
|
||||
this.showRunnerInUseMessage();
|
||||
}
|
||||
if (_.some(response, function (result) {
|
||||
return result.status === 'container_depleted';
|
||||
})) {
|
||||
|
Reference in New Issue
Block a user