diff --git a/pool/pool.go b/pool/pool.go index 5f67e83..af597ad 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -69,7 +69,7 @@ func NewJsRuntimePool(mainScript string, useFileName string, staticPath string, }() for { jrp.jsRuntimePool.PreparePool(jrp.ctx) - time.Sleep(time.Second / 5) + time.Sleep(time.Second * 2) } } go preparePoolTask() @@ -78,13 +78,13 @@ func NewJsRuntimePool(mainScript string, useFileName string, staticPath string, useSrcTask = func() { defer func() { recover() - time.Sleep(time.Second) + time.Sleep(time.Second * 3) useSrcTask() }() for { raw, _ := ioutil.ReadFile(useFileName) useSrc = string(raw) - time.Sleep(time.Second) + time.Sleep(time.Second * 3) } } go useSrcTask()