From 3ca07c047eff58cd47278cff0df1ea50d149d472 Mon Sep 17 00:00:00 2001 From: Smuu <18609909+Smuu@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:53:48 +0200 Subject: [PATCH] feat: try to remove cpu usage Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com> --- pkg/nodes/queue.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/nodes/queue.go b/pkg/nodes/queue.go index 118365c..6d345c5 100644 --- a/pkg/nodes/queue.go +++ b/pkg/nodes/queue.go @@ -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 { @@ -51,9 +52,6 @@ func processQueue() { if err != nil { log.Error("Error checking the nodes: CheckNodesInDBOrCreateThem - ", err) } - - default: - return } } }