Skip to content

Commit

Permalink
attempt is not killable when cancelRequested flag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
frsyuki committed Oct 10, 2017
1 parent de7e8ef commit 7f5f836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions digdag-ui/console.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}) => {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7f5f836

Please sign in to comment.