From 20c7e6c9158be0010b98274917271d7b870df790 Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 25 Dec 2025 17:20:22 -0500 Subject: [PATCH] fix: use context.Background() in invokeCallback for scheduled tasks Signed-off-by: Deluan --- plugins/host_scheduler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/host_scheduler.go b/plugins/host_scheduler.go index 71d2f5a08..8271d6465 100644 --- a/plugins/host_scheduler.go +++ b/plugins/host_scheduler.go @@ -72,7 +72,7 @@ func (s *schedulerServiceImpl) ScheduleOneTime(ctx context.Context, delaySeconds capturedID := scheduleID timer := timeAfterFunc(time.Duration(delaySeconds)*time.Second, func() { - s.invokeCallback(ctx, capturedID) + s.invokeCallback(context.Background(), capturedID) // Clean up the entry after firing s.mu.Lock() delete(s.schedules, capturedID) @@ -97,7 +97,7 @@ func (s *schedulerServiceImpl) ScheduleRecurring(ctx context.Context, cronExpres capturedID := scheduleID callback := func() { - s.invokeCallback(ctx, capturedID) + s.invokeCallback(context.Background(), capturedID) } s.mu.Lock()