From 86f29a4cfbed47542ad6c91f8d5af00be55c2827 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 10 Apr 2017 16:12:03 +0100 Subject: [PATCH] add setting to avoid optimisations outside docker --- services/clsi/app/coffee/OutputCacheManager.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/services/clsi/app/coffee/OutputCacheManager.coffee b/services/clsi/app/coffee/OutputCacheManager.coffee index 91e085ae4d..465b0431d9 100644 --- a/services/clsi/app/coffee/OutputCacheManager.coffee +++ b/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/))