3136352472 5 years ago
parent
commit
276db7e068
  1. 3
      govue/cmd/main.go
  2. 4
      pool/pool.go

3
govue/cmd/main.go

@ -8,7 +8,6 @@ import (
"github.com/google/uuid"
"log"
"mime"
"net/http"
"path/filepath"
)
@ -92,7 +91,7 @@ func main() {
}
if extData["cookie"].(map[string]string)["extdatasessionkey"] == "" {
context.SetCookie("extdatasessionkey", uuid.Must(uuid.NewUUID()).String(), 0, "", context.Request.Host, http.SameSiteLaxMode, false, false)
context.SetCookie("extdatasessionkey", uuid.Must(uuid.NewUUID()).String(), 0, "", context.Request.Host, false, false)
}
raw, err := gv.LoadStaticResources(context.Request, extData)

4
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 * 2)
time.Sleep(time.Second)
}
}
go preparePoolTask()
@ -78,7 +78,7 @@ func NewJsRuntimePool(mainScript string, useFileName string, staticPath string,
useSrcTask = func() {
defer func() {
recover()
time.Sleep(time.Second * 3)
time.Sleep(time.Second)
useSrcTask()
}()
for {

Loading…
Cancel
Save