diff --git a/lib/harmony/harmonytask/doc.go b/lib/harmony/harmonytask/doc.go index 07641976a..44fccb644 100644 --- a/lib/harmony/harmonytask/doc.go +++ b/lib/harmony/harmonytask/doc.go @@ -1,7 +1,6 @@ /* - Package harmomnytask implements a pure (no task logic), distributed - task manager. This clean interface allows a task implementer to completely - +Package harmonytask implements a pure (no task logic), distributed +task manager. This clean interface allows a task implementer to completely avoid being concerned with task scheduling and management. It's based on the idea of tasks as small units of work broken from other work by hardware, parallelizabilty, reliability, or any other reason. @@ -43,7 +42,7 @@ but the design **requires** extraInfo tables to grow until the task's info could not possibly be used by a following task, including slow release rollout. This would normally be in the order of months old. * -Other possible enhancements include more collaboative coordination +Other possible enhancements include more collaborative coordination to assign a task to machines closer to the data. __Database_Behavior__ diff --git a/lib/harmony/harmonytask/harmonytask.go b/lib/harmony/harmonytask/harmonytask.go index 6a9511547..9f6fe5fd3 100644 --- a/lib/harmony/harmonytask/harmonytask.go +++ b/lib/harmony/harmonytask/harmonytask.go @@ -206,7 +206,7 @@ func (e *TaskEngine) GracefullyTerminate(deadline time.Duration) { deadlineChan := time.NewTimer(deadline).C // block bumps & follows by unreg from DBs. - _, err := e.db.Exec(context.Background(), `DELETE FROM harmony_task_impl WHERE owner_id=$1`, e.ownerID) + _, err := e.db.Exec(context.TODO(), `DELETE FROM harmony_task_impl WHERE owner_id=$1`, e.ownerID) if err != nil { log.Warn("Could not clean-up impl table: %w", err) }