diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-22 15:45:01 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-22 15:45:01 +0200 |
| commit | f9fb6743b548aaeb8801d6fd18f60b3f475f1f54 (patch) | |
| tree | 8d06182dea5ab7d67ba7b84aa9332ab7c4a79e79 /app/relay/runner.js | |
| parent | 5ced19fd5c4c50edba41a940d50d1982b033c775 (diff) | |
runnnerrrrrr
Diffstat (limited to 'app/relay/runner.js')
| -rw-r--r-- | app/relay/runner.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/relay/runner.js b/app/relay/runner.js index b138b87..df1b3f2 100644 --- a/app/relay/runner.js +++ b/app/relay/runner.js @@ -439,11 +439,11 @@ export function run_next_task(){ export function stop_task(task, sigkill){ console.log("stop task", task) if (!task) return { error: 'no such task' } - if (task === 'cpu' || state.current_cpu_task.task.uuid === task.uuid) { + if (task === 'cpu' || (task.uuid && state.current_cpu_task.task.uuid === task.uuid)) { console.log('stop cpu task') terminate(state.current_cpu_task, sigkill) return { status: 'ok' } - } else if (task === 'gpu' || state.current_gpu_task.task.uuid === task.uuid) { + } else if (task === 'gpu' || (task.uuid && state.current_gpu_task.task.uuid === task.uuid)) { console.log('stop gpu task') terminate(state.current_gpu_task, sigkill) return { status: 'ok' } |
