mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 21:56:50 +08:00
fix: issues with finished logs. Content was repeating, resulting in a large data load - making the stream fail.
No timestamps were being returned as timestamps for time 0. Occasionally lines would cut off across multiple lines.
This commit is contained in:
@@ -242,7 +242,7 @@ func (s *WorkflowServer) GetWorkflowExecutionLogs(req *api.GetWorkflowExecutionL
|
||||
return err
|
||||
}
|
||||
|
||||
le := []*v1.LogEntry{}
|
||||
le := make([]*v1.LogEntry, 0)
|
||||
for {
|
||||
le = <-watcher
|
||||
if le == nil {
|
||||
@@ -252,8 +252,11 @@ func (s *WorkflowServer) GetWorkflowExecutionLogs(req *api.GetWorkflowExecutionL
|
||||
apiLogEntries := make([]*api.LogEntry, len(le))
|
||||
for i, item := range le {
|
||||
apiLogEntries[i] = &api.LogEntry{
|
||||
Timestamp: item.Timestamp.Format(time.RFC3339),
|
||||
Content: item.Content,
|
||||
Content: item.Content,
|
||||
}
|
||||
|
||||
if item.Timestamp.After(time.Time{}) {
|
||||
apiLogEntries[i].Timestamp = item.Timestamp.Format(time.RFC3339)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user