Skip to content

Commit 4b8edba

Browse files
committed
[executor] Notify InfoLogger on task END_OF_STREAM event
1 parent 4fbd3fb commit 4b8edba

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

executor/executable/controllabletask.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,17 @@ func (t *ControllableTask) Launch() error {
524524
WithField("detector", t.knownDetector).
525525
Debug("nil DeviceEvent received (NULL_DEVICE_EVENT) - closing stream")
526526
break
527+
} else {
528+
if deviceEvent.GetType() == pb.DeviceEventType_END_OF_STREAM {
529+
taskId := deo.TaskId.Value
530+
531+
log.WithField("partition", t.knownEnvironmentId.String()).
532+
WithField("detector", t.knownDetector).
533+
WithField("taskId", taskId).
534+
WithField("taskName", t.ti.Name).
535+
WithField("taskPid", t.knownPid).
536+
Debug("END_OF_STREAM DeviceEvent received - notifying environment")
537+
}
527538
}
528539
deviceEvent.SetLabels(map[string]string{"detector": t.knownDetector, "environmentId": t.knownEnvironmentId.String()})
529540

0 commit comments

Comments
 (0)