From f3849727ca8e83d88bbd6a521601359d41c62357 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sun, 30 Jun 2019 11:35:20 +0200 Subject: Add CLI flag for the concurrency level of libvips --- gopherproxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gopherproxy.go') diff --git a/gopherproxy.go b/gopherproxy.go index 0ecfa14..0134f88 100644 --- a/gopherproxy.go +++ b/gopherproxy.go @@ -242,7 +242,7 @@ func FontHandler(woff2 bool, fontdata []byte) http.HandlerFunc { // specified by the request. The robots argument is a pointer to // a robotstxt.RobotsData struct for testing user agents against // a configurable robots.txt file. -func ListenAndServe(bind, robotsfile string, robotsdebug bool, uri string) error { +func ListenAndServe(bind, robotsfile string, robotsdebug bool, vipsconcurrency int, uri string) error { var ( tpl *template.Template robotsdata *robotstxt.RobotsData @@ -329,7 +329,7 @@ func ListenAndServe(bind, robotsfile string, robotsdebug bool, uri string) error } vips.Startup(&vips.Config{ - ConcurrencyLevel: 0, + ConcurrencyLevel: vipsconcurrency, }) http.HandleFunc("/", GopherHandler(tpl, robotsdata, AssetHashList{stylehash, jshash, fontwhash, fontw2hash}, robotsdebug, uri)) -- cgit v1.2.3-54-g00ecf