From 9589de551eea6bd0dc64a73814944ae5f1131a9a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 24 Nov 2015 14:07:47 -0500 Subject: [PATCH] added toggler to disable toobusy if necessary --- src/middleware/middleware.js | 2 +- src/views/admin/settings/advanced.tpl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 9cc9d2d523..e2c5747ab6 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -221,7 +221,7 @@ middleware.privateUploads = function(req, res, next) { }; middleware.busyCheck = function(req, res, next) { - if (global.env === 'production' && toobusy()) { + if (global.env === 'production' && (!meta.config.hasOwnProperty('eventLoopCheckEnabled') || parseInt(meta.config.eventLoopCheckEnabled, 10) === 1) && toobusy()) { res.type('text/html').sendFile(path.join(__dirname, '../../public/503.html')); } else { next(); diff --git a/src/views/admin/settings/advanced.tpl b/src/views/admin/settings/advanced.tpl index 3a0a314106..b53cabacfb 100644 --- a/src/views/admin/settings/advanced.tpl +++ b/src/views/admin/settings/advanced.tpl @@ -50,6 +50,12 @@ point.

+
+ +