fix: high cpu usage fix
This commit is contained in:
parent
4532b7a87a
commit
dced610d6b
@ -1,6 +1,10 @@
|
||||
package lib
|
||||
|
||||
import "rul.sh/go-ytmp3/utils"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"rul.sh/go-ytmp3/utils"
|
||||
)
|
||||
|
||||
type Task struct {
|
||||
Url string `json:"url"`
|
||||
@ -48,6 +52,7 @@ func InitTaskScheduler() *TaskScheduler {
|
||||
return
|
||||
default:
|
||||
if len(queue) == 0 {
|
||||
time.Sleep(1 * time.Second)
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user