فهرست منبع

Merge pull request #56 from sharelatex/bg-disable-qpdf-setting

add setting to avoid optimisations outside docker
Brian Gough 9 سال پیش
والد
کامیت
8892a50486
1فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 7 2
      services/clsi/app/coffee/OutputCacheManager.coffee

+ 7 - 2
services/clsi/app/coffee/OutputCacheManager.coffee

@@ -172,8 +172,13 @@ module.exports = OutputCacheManager =
 				logger.error err: err, src: src, dst: dst, "copy error for file in cache"
 				callback(err)
 			else
-				# call the optimiser for the file too
-				OutputFileOptimiser.optimiseFile src, dst, callback
+				if Settings.clsi?.optimiseInDocker
+					# don't run any optimisations on the pdf when they are done
+					# in the docker container
+					callback()
+				else
+					# call the optimiser for the file too
+					OutputFileOptimiser.optimiseFile src, dst, callback
 
 	_checkIfShouldCopy: (src, callback = (err, shouldCopy) ->) ->
 		return callback(null, !Path.basename(src).match(/^strace/))