diff --git a/main.go b/main.go index 6351c03..9e18fa5 100644 --- a/main.go +++ b/main.go @@ -427,6 +427,16 @@ func handleTask(w http.ResponseWriter, r *http.Request) { Time: now.Add(time.Duration(i-90) * time.Minute), } } + } else { + mu.RLock() + if existing, ok := tasks[task.ID]; ok { + task.History = existing.History + task.InStock = existing.InStock + task.LastCheck = existing.LastCheck + task.Status = existing.Status + task.Notified = existing.Notified + } + mu.RUnlock() } mu.Lock()