diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-30 11:35:20 +0200 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-30 11:35:20 +0200 |
commit | f3849727ca8e83d88bbd6a521601359d41c62357 (patch) | |
tree | e3e0a768d87850e03e7c8afbf31282d179f46149 /gopherproxy.go | |
parent | Upgrade to packr v2 (diff) | |
download | gopherproxy-f3849727ca8e83d88bbd6a521601359d41c62357.tar.gz gopherproxy-f3849727ca8e83d88bbd6a521601359d41c62357.tar.bz2 gopherproxy-f3849727ca8e83d88bbd6a521601359d41c62357.zip |
Add CLI flag for the concurrency level of libvips
Diffstat (limited to 'gopherproxy.go')
-rw-r--r-- | gopherproxy.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
242 | // specified by the request. The robots argument is a pointer to | 242 | // specified by the request. The robots argument is a pointer to |
243 | // a robotstxt.RobotsData struct for testing user agents against | 243 | // a robotstxt.RobotsData struct for testing user agents against |
244 | // a configurable robots.txt file. | 244 | // a configurable robots.txt file. |
245 | func ListenAndServe(bind, robotsfile string, robotsdebug bool, uri string) error { | 245 | func ListenAndServe(bind, robotsfile string, robotsdebug bool, vipsconcurrency int, uri string) error { |
246 | var ( | 246 | var ( |
247 | tpl *template.Template | 247 | tpl *template.Template |
248 | robotsdata *robotstxt.RobotsData | 248 | robotsdata *robotstxt.RobotsData |
@@ -329,7 +329,7 @@ func ListenAndServe(bind, robotsfile string, robotsdebug bool, uri string) error | |||
329 | } | 329 | } |
330 | 330 | ||
331 | vips.Startup(&vips.Config{ | 331 | vips.Startup(&vips.Config{ |
332 | ConcurrencyLevel: 0, | 332 | ConcurrencyLevel: vipsconcurrency, |
333 | }) | 333 | }) |
334 | 334 | ||
335 | http.HandleFunc("/", GopherHandler(tpl, robotsdata, AssetHashList{stylehash, jshash, fontwhash, fontw2hash}, robotsdebug, uri)) | 335 | http.HandleFunc("/", GopherHandler(tpl, robotsdata, AssetHashList{stylehash, jshash, fontwhash, fontw2hash}, robotsdebug, uri)) |