Merge branch 'dev' into iam

This commit is contained in:
Ingo Oppermann 2023-05-16 13:19:45 +02:00
commit f03e2ca5c5
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -1044,12 +1044,6 @@ func (r *restream) UpdateProcess(id, user, group string, config *app.Config) err
return ErrUnknownProcess
}
// This would require a major version jump
//t.process.CreatedAt = task.process.CreatedAt
t.process.UpdatedAt = time.Now().Unix()
task.parser.TransferReportHistory(t.parser)
t.process.Order = task.process.Order
if tid != t.String() {
_, ok := r.tasks[t.String()]
if ok {
@ -1057,14 +1051,21 @@ func (r *restream) UpdateProcess(id, user, group string, config *app.Config) err
}
}
t.process.Order = task.process.Order
if err := r.stopProcess(tid); err != nil {
return err
return fmt.Errorf("stop process: %w", err)
}
if err := r.deleteProcess(tid); err != nil {
return err
return fmt.Errorf("delete process: %w", err)
}
// This would require a major version jump
//t.process.CreatedAt = task.process.CreatedAt
t.process.UpdatedAt = time.Now().Unix()
task.parser.TransferReportHistory(t.parser)
tid = t.String()
r.tasks[tid] = t