Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Add stopping status to task (#3868)
Browse files Browse the repository at this point in the history
* stopping

* fix
  • Loading branch information
sunqinzheng authored Nov 20, 2019
1 parent 788ec67 commit 2dc2411
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rest-server/src/models/v2/job/k8s.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ const convertState = (state, exitCode, retryDelaySec) => {
case 'AttemptPreparing':
return 'WAITING';
case 'AttemptRunning':
return 'RUNNING';
case 'AttemptDeletionPending':
case 'AttemptDeletionRequested':
case 'AttemptDeleting':
return 'RUNNING';
if (exitCode === -210 || exitCode === -220) {
return 'STOPPING';
} else {
return 'RUNNING';
}
case 'AttemptCompleted':
if (retryDelaySec == null) {
return 'RUNNING';
Expand Down
2 changes: 2 additions & 0 deletions src/webportal/src/app/components/util/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export function getHumanizedJobStateString(job) {
return 'Failed';
} else if (job.state === 'STOPPED') {
return 'Stopped';
} else if (job.state === 'STOPPING') {
return 'Stopping';
} else {
return 'Unknown';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const TaskRoleCount = ({ taskInfo }) => {
count.running += 1;
break;
case 'WAITING':
case 'STOPPING':
count.waiting += 1;
break;
case 'SUCCEEDED':
Expand Down

0 comments on commit 2dc2411

Please sign in to comment.