Fix too early history transfer to new parser during process update

This commit is contained in:
Ingo Oppermann 2023-05-02 22:39:34 +02:00
parent 9545525e46
commit 4d5a1f9617
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -1034,12 +1034,6 @@ func (r *restream) UpdateProcess(id string, config *app.Config) error {
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 id != t.id {
_, ok := r.tasks[t.id]
if ok {
@ -1055,6 +1049,12 @@ func (r *restream) UpdateProcess(id string, config *app.Config) error {
return 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)
t.process.Order = task.process.Order
r.tasks[t.id] = t
// set filesystem cleanup rules