1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-06-22 22:37:41 +02:00

Check timeout automatically

This commit is contained in:
DarthSim
2022-06-23 17:23:04 +06:00
parent d80a203390
commit a44e8dc94b
8 changed files with 9 additions and 25 deletions

View File

@ -6,6 +6,7 @@ import (
"github.com/imgproxy/imgproxy/v3/imagedata"
"github.com/imgproxy/imgproxy/v3/imagetype"
"github.com/imgproxy/imgproxy/v3/options"
"github.com/imgproxy/imgproxy/v3/router"
"github.com/imgproxy/imgproxy/v3/vips"
)
@ -52,6 +53,7 @@ func (p pipeline) Run(ctx context.Context, img *vips.Image, po *options.Processi
if err := step(&pctx, img, po, imgdata); err != nil {
return err
}
router.CheckTimeout(ctx)
}
return nil