Skip to content

Commit 55fb5ee

Browse files
Merge pull request #551 from astefanutti/pr-07
Use receive-only channels for stopping controllers
2 parents 5560b7c + 87bdb70 commit 55fb5ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/controller/queuejob/queuejob_controller_ex.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ func (qjm *XController) backoff(ctx context.Context, q *arbv1.AppWrapper, reason
14071407
}
14081408

14091409
// Run starts AppWrapper Controller
1410-
func (cc *XController) Run(stopCh chan struct{}) {
1410+
func (cc *XController) Run(stopCh <-chan struct{}) {
14111411
go cc.appwrapperInformer.Informer().Run(stopCh)
14121412

14131413
go cc.qjobResControls[arbv1.ResourceTypePod].Run(stopCh)

pkg/controller/queuejobdispatch/queuejobagent.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (cc *JobClusterAgent) deleteQueueJob(obj interface{}) {
153153
cc.agentEventQueue.Add(qj)
154154
}
155155

156-
func (qa *JobClusterAgent) Run(stopCh chan struct{}) {
156+
func (qa *JobClusterAgent) Run(stopCh <-chan struct{}) {
157157
go qa.jobInformer.Informer().Run(stopCh)
158158
cache.WaitForCacheSync(stopCh, qa.jobSynced)
159159
}

0 commit comments

Comments
 (0)