Skip to content

Commit

Permalink
Merge pull request #8 from celestiaorg/smuu/reduce-cpu-usage
Browse files Browse the repository at this point in the history
feat: try to remove cpu usage
  • Loading branch information
smuu authored Apr 10, 2024
2 parents e199718 + 3ca07c0 commit 8100830
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 8100830

Please sign in to comment.