mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
prefetch in background
This commit is contained in:
parent
f4a1bad454
commit
04ea19331c
@ -302,7 +302,7 @@ func prefetchImages(confImgPath string, ExhaustPath string, QUALITY string) {
|
|||||||
go webpEncoder(picAbsPath, p2, float32(q), false, finishChan)
|
go webpEncoder(picAbsPath, p2, float32(q), false, finishChan)
|
||||||
count += <-finishChan
|
count += <-finishChan
|
||||||
//progress bar
|
//progress bar
|
||||||
_, _ = fmt.Fprintf(os.Stdout, "Convert in progress: %d/%d\r", count, all)
|
_, _ = fmt.Fprintf(os.Stdout, "[Webp Server started] - convert in progress: %d/%d\r", count, all)
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -342,7 +342,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if prefetch {
|
if prefetch {
|
||||||
prefetchImages(confImgPath, ExhaustPath, QUALITY)
|
go prefetchImages(confImgPath, ExhaustPath, QUALITY)
|
||||||
}
|
}
|
||||||
|
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user