From 9516caa32a037c87aeec8bbfc875aad05633ecd9 Mon Sep 17 00:00:00 2001 From: Jason li Date: Thu, 14 Jan 2021 15:42:37 +0800 Subject: [PATCH] fix context nil lint --- task/task.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/task/task.go b/task/task.go index 2904ed97..acf42ae4 100644 --- a/task/task.go +++ b/task/task.go @@ -525,7 +525,7 @@ func (m *taskManager) run() { func (m *taskManager) setTasksStartTime(now time.Time) { m.taskLock.Lock() for _, task := range m.adminTaskList { - task.SetNext(nil, now) + task.SetNext(context.Background(), now) } m.taskLock.Unlock() } @@ -562,7 +562,7 @@ func runNextTasks(sortList *MapSorter, effective time.Time) { } e.SetPrev(context.Background(), e.GetNext(context.Background())) - e.SetNext(nil, effective) + e.SetNext(context.Background(), effective) } }