From 833690e1a1bd1428d6cc4eed88f549e6f7c1f04c Mon Sep 17 00:00:00 2001 From: John Roesler Date: Tue, 30 Jan 2024 15:28:29 -0600 Subject: [PATCH] update lint issues --- executor.go | 4 ++-- scheduler.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/executor.go b/executor.go index 7386d721..109805e1 100644 --- a/executor.go +++ b/executor.go @@ -19,7 +19,7 @@ type executor struct { jobOutRequest chan jobOutRequest stopTimeout time.Duration done chan error - singletonRunners sync.Map //map[uuid.UUID]singletonRunner + singletonRunners *sync.Map // map[uuid.UUID]singletonRunner limitMode *limitModeConfig elector Elector locker Locker @@ -67,7 +67,7 @@ func (e *executor) start() { limitModeJobsWg := &waitGroupWithMutex{} // create a fresh map for tracking singleton runners - e.singletonRunners = sync.Map{} + e.singletonRunners = &sync.Map{} // start the for leap that is the executor // selecting on channels for work to do diff --git a/scheduler.go b/scheduler.go index 1f30d67c..c2bc53d3 100644 --- a/scheduler.go +++ b/scheduler.go @@ -5,7 +5,6 @@ import ( "context" "reflect" "runtime" - "sync" "time" "github.com/google/uuid" @@ -107,7 +106,7 @@ func NewScheduler(options ...SchedulerOption) (Scheduler, error) { exec := executor{ stopCh: make(chan struct{}), stopTimeout: time.Second * 10, - singletonRunners: sync.Map{}, + singletonRunners: nil, logger: &noOpLogger{}, jobsIn: make(chan jobIn),