From 7f5f8366c467eccd5d14016cbe0122f7ef386435 Mon Sep 17 00:00:00 2001 From: Sadayuki Furuhashi Date: Mon, 9 Oct 2017 18:39:36 -0700 Subject: [PATCH] attempt is not killable when cancelRequested flag is set --- digdag-ui/console.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/digdag-ui/console.jsx b/digdag-ui/console.jsx index 4c092a7887..9970c80df8 100644 --- a/digdag-ui/console.jsx +++ b/digdag-ui/console.jsx @@ -355,11 +355,11 @@ function attemptCanResume (attempt) { return attempt.done && !attempt.success } -function attemptCanKill (attempt) { +function attemptCanBeKilled (attempt) { if (!attempt) { return false } - return !attempt.done && !attempt.success + return !attempt.done && !attempt.cancelRequested } const SessionStatusView = ({session}:{session: Session}) => { @@ -1038,7 +1038,7 @@ class AttemptView extends React.Component { render () { const attempt = this.state.attempt - const canKill = attemptCanKill(attempt) + const canKill = attemptCanBeKilled(attempt) if (!attempt) { return null