Possibly fixes 5137: Only execute "optimize table" when allowed

This commit is contained in:
Michael 2018-05-27 06:23:18 +00:00
parent e9dbf55400
commit 04fd6eff01

View file

@ -102,7 +102,9 @@ Class Cron {
dba::delete('workerqueue', ['`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 1 HOUR']);
// Optimizing this table only last seconds
if (Config::get('system', 'optimize_workerqueue', false)) {
dba::e("OPTIMIZE TABLE `workerqueue`");
}
Config::set('system', 'last_cron_hourly', time());
}