From 04fd6eff010a549cb4b1d4523246e7083cefe17f Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 27 May 2018 06:23:18 +0000 Subject: [PATCH] Possibly fixes 5137: Only execute "optimize table" when allowed --- src/Worker/Cron.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index b0337e7db5..e425c03508 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -102,7 +102,9 @@ Class Cron { dba::delete('workerqueue', ['`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 1 HOUR']); // Optimizing this table only last seconds - dba::e("OPTIMIZE TABLE `workerqueue`"); + if (Config::get('system', 'optimize_workerqueue', false)) { + dba::e("OPTIMIZE TABLE `workerqueue`"); + } Config::set('system', 'last_cron_hourly', time()); } -- 2.39.5