Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Nov 27, 2024
1 parent 6c30299 commit 10d0cf7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kwok/controllers/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ func (c *NodeController) playStageWorker(ctx context.Context) {
if !ok {
return
}
if c.delayQueue.Len() > 10 {
go c.playStageWorker(ctx)
}
c.delayQueueMapping.Delete(node.Key)
needRetry, err := c.playStage(ctx, node.Resource, node.Stage)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/kwok/controllers/node_lease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ func (c *NodeLeaseController) syncWorker(ctx context.Context) {
if !ok {
return
}
if c.delayQueue.Len() > 10 {
go c.syncWorker(ctx)
}
first, ok := c.holdLeaseSet.Load(nodeName)
if !ok {
continue
Expand Down
3 changes: 3 additions & 0 deletions pkg/kwok/controllers/pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ func (c *PodController) playStageWorker(ctx context.Context) {
if !ok {
return
}
if c.delayQueue.Len() > 10 {
go c.playStageWorker(ctx)
}
c.delayQueueMapping.Delete(pod.Key)
needRetry, err := c.playStage(ctx, pod.Resource, pod.Stage)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/kwok/controllers/stage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ func (c *StageController) playStageWorker(ctx context.Context) {
if !ok {
return
}
if c.delayQueue.Len() > 10 {
go c.playStageWorker(ctx)
}
c.delayQueueMapping.Delete(resource.Key)
needRetry, err := c.playStage(ctx, resource.Resource, resource.Stage)
if err != nil {
Expand Down

0 comments on commit 10d0cf7

Please sign in to comment.