move singleton runner map to be fresh on executor start
This commit is contained in:
+3
-4
@@ -63,6 +63,9 @@ func (e *executor) start() {
|
|||||||
mu: sync.Mutex{},
|
mu: sync.Mutex{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create a fresh map for tracking singleton runners
|
||||||
|
e.singletonRunners = make(map[uuid.UUID]singletonRunner)
|
||||||
|
|
||||||
// start the for leap that is the executor
|
// start the for leap that is the executor
|
||||||
// selecting on channels for work to do
|
// selecting on channels for work to do
|
||||||
for {
|
for {
|
||||||
@@ -267,10 +270,6 @@ func (e *executor) stop(standardJobsWg, singletonJobsWg, limitModeJobsWg *waitGr
|
|||||||
count++
|
count++
|
||||||
case <-waitForSingletons:
|
case <-waitForSingletons:
|
||||||
count++
|
count++
|
||||||
// emptying the singleton runner map
|
|
||||||
// as we'll need to spin up new runners
|
|
||||||
// in the event that the scheduler is started again
|
|
||||||
e.singletonRunners = make(map[uuid.UUID]singletonRunner)
|
|
||||||
case <-waitForLimitMode:
|
case <-waitForLimitMode:
|
||||||
count++
|
count++
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user