File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments