3136352472 5 years ago
parent
commit
ee783db793
  1. 6
      pool/pool.go

6
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()

Loading…
Cancel
Save