feat: updated workflow logs to return a response that may contain several log entries.

This commit is contained in:
Andrey Melnikov
2020-12-30 12:02:25 -08:00
parent ba776cddbd
commit 543367c36e
5 changed files with 559 additions and 474 deletions

View File

@@ -249,14 +249,19 @@ func (s *WorkflowServer) GetWorkflowExecutionLogs(req *api.GetWorkflowExecutionL
break
}
for _, item := range le {
if err := stream.Send(&api.LogEntry{
apiLogEntries := make([]*api.LogEntry, len(le))
for i, item := range le {
apiLogEntries[i] = &api.LogEntry{
Timestamp: item.Timestamp.Format(time.RFC3339),
Content: item.Content,
}); err != nil {
return err
}
}
if err := stream.Send(&api.LogStreamResponse{
LogEntries: apiLogEntries,
}); err != nil {
return err
}
}
return nil