diff options
Diffstat (limited to 'app/client/system/system.reducer.js')
| -rw-r--r-- | app/client/system/system.reducer.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/client/system/system.reducer.js b/app/client/system/system.reducer.js index 132923b..8378bf3 100644 --- a/app/client/system/system.reducer.js +++ b/app/client/system/system.reducer.js @@ -159,6 +159,7 @@ const systemReducer = (state = systemInitialState, action) => { } } case types.task.task_begin: + console.log('task begin', action.task, action.task.processor) return { ...state, runner: { @@ -175,10 +176,10 @@ const systemReducer = (state = systemInitialState, action) => { stderr: "", } case types.task.task_finish: - if (action.task === 'cpu' || state.runner.cpu.task.uuid === action.task.uuid) { + if (action.task === 'cpu' || (state.runner.cpu.task && action.task && state.runner.cpu.task.uuid === action.task.uuid)) { processor = 'cpu' } - else if (action.task === 'gpu' || state.runner.gpu.task.uuid === action.task.uuid) { + else if (action.task === 'gpu' || (state.runner.cpu.task && action.task && state.runner.gpu.task.uuid === action.task.uuid)) { processor = 'gpu' } else { processor = null |
