Skip to content

Commit

Permalink
fix: correct run-state-machine state resource when waiting on a heart…
Browse files Browse the repository at this point in the history
…best
  • Loading branch information
jezhiggins committed Jun 26, 2018
1 parent 58455a2 commit b4efc6d
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ class RunStateMachine {
cause: execDesc.errorMessage
})
} else {
context.sendTaskHeartbeat(execDesc.ctx, (err, executionDescription) => {
if (err) throw new Error(err)
executionDescription.currentResource = execDesc.currentResource
done(executionDescription)
})
const executionDescription = await context.sendTaskHeartbeat(execDesc.ctx)
executionDescription.currentResource = execDesc.currentResource
done(executionDescription)
}
} // run
} // class RunStateMachine
Expand Down

0 comments on commit b4efc6d

Please sign in to comment.