Skip to content

Commit 833a1c3

Browse files
claireguyotteo
authored andcommitted
[OCTRL-690] O2 End Time timestamp is correctly set in case of early run failure.
1 parent 825b938 commit 833a1c3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

core/environment/environment.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ func newEnvironment(userVars map[string]string) (env *Environment, err error) {
188188
// once we make a smooth transition to "leave_RUNNING" in ControlWorkflows, this could be deleted.
189189
runEndTime := strconv.FormatInt(time.Now().UnixMilli(), 10)
190190
env.workflow.SetRuntimeVar("run_end_time_ms", runEndTime)
191+
} else if e.Event == "GO_ERROR" {
192+
runEndTime := strconv.FormatInt(time.Now().UnixMilli(), 10)
193+
env.workflow.SetRuntimeVar("run_end_time_ms", runEndTime)
191194
}
192195
errHooks := env.handleHooks(env.Workflow(), fmt.Sprintf("before_%s", e.Event))
193196
if errHooks != nil {

0 commit comments

Comments
 (0)