diff options
author | Christian Schneider | 2020-10-28 18:49:20 +0100 |
---|---|---|
committer | Christian Schneider | 2020-10-28 18:49:20 +0100 |
commit | 0b1ec413a83ab8c740106336ec16eb6ab9164bb7 (patch) | |
tree | 83f20d71c2f80aac588b42523334147dd8be5d89 /it.class | |
parent | 8fc9ba53252afdef2c78d811ef9b3ec65b755caf (diff) | |
download | itools-0b1ec413a83ab8c740106336ec16eb6ab9164bb7.tar.gz itools-0b1ec413a83ab8c740106336ec16eb6ab9164bb7.tar.bz2 itools-0b1ec413a83ab8c740106336ec16eb6ab9164bb7.zip |
Limit parallel threads of GraphicsMagick to avoid overloading servers
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |