Move preheat operation in the goroutine
All checks were successful
release-nightly / build-docker (push) Successful in 1m7s

This commit is contained in:
LittleSheep 2023-12-14 21:29:26 +08:00
parent 996e52a5f9
commit ed1b20873d
2 changed files with 7 additions and 5 deletions

View File

@ -51,10 +51,12 @@ func main() {
} }
// Preheat processes // Preheat processes
go func() {
log.Info().Msg("Preheating processes...") log.Info().Msg("Preheating processes...")
sign.App.PreheatProcesses(func(total int, success int) { sign.App.PreheatProcesses(func(total int, success int) {
log.Info().Int("requested", total).Int("succeed", success).Msgf("Preheat processes completed!") log.Info().Int("requested", total).Int("succeed", success).Msgf("Preheat processes completed!")
}) })
}()
// Init hypertext server // Init hypertext server
hypertext.RunServer( hypertext.RunServer(

View File

@ -5,4 +5,4 @@ rules:
upstreams: upstreams:
- id: example - id: example
name: Benchmarking Data name: Benchmarking Data
uri: files://../data/spa uri: files://../data/spa?fallback=index.html