From cd42318496357e6f65014462ed55fea9c59dbca3 Mon Sep 17 00:00:00 2001 From: Mikhail Scherba <41360396+miklezzzz@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:52:23 +0400 Subject: [PATCH] fix schedule-manager entry clean-up (#666) Signed-off-by: Mikhail Scherba --- pkg/schedule_manager/schedule_manager.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/schedule_manager/schedule_manager.go b/pkg/schedule_manager/schedule_manager.go index f0c7bd1b..fcf86917 100644 --- a/pkg/schedule_manager/schedule_manager.go +++ b/pkg/schedule_manager/schedule_manager.go @@ -104,6 +104,7 @@ func (sm *scheduleManager) Remove(delEntry ScheduleEntry) { // if all ids are deleted, stop scheduled function if len(sm.Entries[delEntry.Crontab].Ids) == 0 { sm.cron.Remove(sm.Entries[delEntry.Crontab].EntryID) + delete(sm.Entries, delEntry.Crontab) log.WithField("operator.component", "scheduleManager").Debugf("entry '%s' deleted", delEntry.Crontab) } }