Use optimized update statements

This commit is contained in:
Philipp 2023-05-13 22:14:52 +02:00
parent 557d0e3aeb
commit 5be9c9dbaf
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
8 changed files with 83 additions and 51 deletions

View file

@ -151,8 +151,8 @@ class Cron
// We are acquiring the two locks from the worker to avoid locking problems
if (DI::lock()->acquire(Worker::LOCK_PROCESS, 10)) {
if (DI::lock()->acquire(Worker::LOCK_WORKER, 10)) {
DBA::e("OPTIMIZE TABLE `workerqueue`");
DBA::e("OPTIMIZE TABLE `process`");
DBA::optimizeTable('workerqueue');
DBA::optimizeTable('process');
DI::lock()->release(Worker::LOCK_WORKER);
}
DI::lock()->release(Worker::LOCK_PROCESS);