You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-29 23:07:40 +02:00
Better error metrics
This commit is contained in:
@@ -53,7 +53,10 @@ 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)
|
||||
|
||||
if err := router.CheckTimeout(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -214,7 +214,9 @@ func saveImageToFitBytes(ctx context.Context, po *options.ProcessingOptions, img
|
||||
}
|
||||
imgdata.Close()
|
||||
|
||||
router.CheckTimeout(ctx)
|
||||
if err := router.CheckTimeout(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
delta := float64(len(imgdata.Data)) / float64(po.MaxBytes)
|
||||
switch {
|
||||
|
||||
Reference in New Issue
Block a user