Increase timeout
This commit is contained in:
parent
036e9fa4a1
commit
48599bac5f
2
main.go
2
main.go
@ -91,7 +91,7 @@ func generateImage(vars map[string]string) ([]byte, error) {
|
|||||||
|
|
||||||
imageFile, err := os.CreateTemp(os.TempDir(), "img-*.png")
|
imageFile, err := os.CreateTemp(os.TempDir(), "img-*.png")
|
||||||
|
|
||||||
chrome := svg2png.NewChrome().SetHeight(600).SetWith(1200)
|
chrome := svg2png.NewChrome().SetHeight(600).SetWith(1200).SetTimeout(10 * time.Second)
|
||||||
if err := chrome.Screenshoot(fmt.Sprintf("file://%s", file.Name()), imageFile.Name()); err != nil {
|
if err := chrome.Screenshoot(fmt.Sprintf("file://%s", file.Name()), imageFile.Name()); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user