summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2020-10-28 18:49:20 +0100
committerChristian Schneider2020-10-28 18:49:20 +0100
commit0b1ec413a83ab8c740106336ec16eb6ab9164bb7 (patch)
tree83f20d71c2f80aac588b42523334147dd8be5d89
parent8fc9ba53252afdef2c78d811ef9b3ec65b755caf (diff)
downloaditools-0b1ec413a83ab8c740106336ec16eb6ab9164bb7.tar.gz
itools-0b1ec413a83ab8c740106336ec16eb6ab9164bb7.tar.bz2
itools-0b1ec413a83ab8c740106336ec16eb6ab9164bb7.zip
Limit parallel threads of GraphicsMagick to avoid overloading servers
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index a50d325..7671ea8 100644
--- a/it.class
+++ b/it.class
@@ -797,7 +797,7 @@ static function imageconvert($p)
$ultratimeout = file_exists("/opt/ultra/bin/ultratimeout") ? "/opt/ultra/bin/ultratimeout 30 " : "";
if (in_array($type, explode(',', $p['types']))) # Valid type?
- $cmdoutput = it::exec('( ' . $ultratimeout . 'gm convert 2>&1 {-opts} {in} {type}:{out} || echo "SHELL ERROR $?" ) | grep -v " iCCP: "', $p);
+ $cmdoutput = it::exec('( ' . $ultratimeout . 'gm convert -limit threads 2 2>&1 {-opts} {in} {type}:{out} || echo "SHELL ERROR $?" ) | grep -v " iCCP: "', $p);
if ($p['pngcrush'] && $p['type'] == "png")
it::exec('pngcrush.sh 2>/dev/null {out} {out}.tmp && mv {out}.tmp {out} || rm {out}.tmp', $p);