1
0
Fork 0

Merge remote-tracking branch 'upstream/develop' into search

This commit is contained in:
Michael 2023-05-17 01:30:56 +00:00
commit 97456ff205
20 changed files with 377 additions and 180 deletions

View file

@ -129,20 +129,6 @@ class Update
DI::lock()->release('dbupdate', true);
}
if (!DBStructure::existsTable('config')) {
DBA::e(<<<EOF
CREATE TABLE IF NOT EXISTS `config` (
`id` int unsigned NOT NULL auto_increment COMMENT '',
`cat` varbinary(50) NOT NULL DEFAULT '' COMMENT 'The category of the entry',
`k` varbinary(50) NOT NULL DEFAULT '' COMMENT 'The key of the entry',
`v` mediumtext COMMENT '',
PRIMARY KEY(`id`),
UNIQUE INDEX `cat_k` (`cat`,`k`)
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='main configuration storage';
EOF
);
}
$build = DI::config()->get('system', 'build');
if (empty($build)) {

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);
@ -197,7 +197,7 @@ class Cron
// Optimizing this table only last seconds
if (DI::config()->get('system', 'optimize_tables')) {
Logger::info('Optimize start');
DBA::e("OPTIMIZE TABLE `post-delivery`");
DBA::optimizeTable('post-delivery');
Logger::info('Optimize end');
}
}