Skip to content

Commit

Permalink
Made pending tasks deletable if a task result exists
Browse files Browse the repository at this point in the history
Partially addresses issue: #25".
Specifically,  "Deployments stuck in pending state with no ability to
control them".
  • Loading branch information
nuwang committed Dec 15, 2017
1 parent bae9966 commit f9e9612
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ export class DeploymentComponent implements OnInit, OnDestroy {
}

isLatestTaskRunning() {
return this.deployment.latest_task.status === 'PENDING' || this.deployment.latest_task.status === 'PROGRESSING';
// Pending tasks should not have a task result. Sometimes, tasks are stuck in pending
// because they have errored out prior to launch - so check for the result too.
return (this.deployment.latest_task.status === 'PENDING' && !this.deployment.latest_task.result) ||
this.deployment.latest_task.status === 'PROGRESSING';
}

getKPDownloadLink(material: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<span *ngSwitchCase="'unknown'" class="text-info">
<i class="fa fa-question-circle fa-fw"></i> UNKNOWN
</span>
<span *ngSwitchCase="'not_found'" class="text-warning">
<i class="fa fa-exclamation-circle fa-fw"></i> NOT FOUND
</span>
<span *ngSwitchCase="'pending'" class="text-info">
<i class="fa fa-hourglass fa-fw"></i> PENDING
</span>
Expand Down

0 comments on commit f9e9612

Please sign in to comment.