Skip to content

Commit

Permalink
feat: try to remove cpu usage
Browse files Browse the repository at this point in the history
Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
  • Loading branch information
smuu committed Apr 5, 2024
1 parent e199718 commit 3ca07c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/nodes/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
// ProcessTaskQueue processes the pending tasks in the queue the time specified in the const TickerTime.
func ProcessTaskQueue() {
ticker := time.NewTicker(TickerTime)
defer ticker.Stop()

for {
select {
Expand Down Expand Up @@ -51,9 +52,6 @@ func processQueue() {
if err != nil {
log.Error("Error checking the nodes: CheckNodesInDBOrCreateThem - ", err)
}

default:
return
}
}
}
Expand Down

0 comments on commit 3ca07c0

Please sign in to comment.