Skip to content

Commit 8081e74

Browse files
claireguyotteo
authored andcommitted
[OCTRL-680] Correcting PR problems.
1 parent 0eadca0 commit 8081e74

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

core/integration/bookkeeping/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
344344
return
345345
} else {
346346
var updatedRun string
347-
if function, ok := varStack["__call_func"]; ok && function == "UpdateRunStop" {
347+
if function, ok := varStack["__call_func"]; ok && strings.Contains(function, "UpdateRunStop") {
348348
updatedRun = "STOPPED"
349349
delete(p.pendingRunStops, envId)
350350
} else {

core/integration/trg/plugin.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,10 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
599599
Debug("TRG RunStart success")
600600

601601
trgStartTime := strconv.FormatInt(time.Now().UnixMilli(), 10)
602-
call.GetParentRole().(callable.ParentRole).SetRuntimeVar("trg_start_time_ms", trgStartTime)
602+
parentRole, ok := call.GetParentRole().(callable.ParentRole)
603+
if ok {
604+
parentRole.SetGlobalRuntimeVar("trg_start_time_ms", trgStartTime)
605+
}
603606

604607
return
605608
}
@@ -706,7 +709,10 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
706709
Debug("TRG RunStop success")
707710

708711
trgEndTime := strconv.FormatInt(time.Now().UnixMilli(), 10)
709-
call.GetParentRole().(callable.ParentRole).SetRuntimeVar("trg_end_time_ms", trgEndTime)
712+
parentRole, ok := call.GetParentRole().(callable.ParentRole)
713+
if ok {
714+
parentRole.SetGlobalRuntimeVar("trg_end_time_ms", trgEndTime)
715+
}
710716

711717
return
712718
}

0 commit comments

Comments
 (0)