Browse Source

remove transaction from tables optimization case

main
ghost 2 years ago
parent
commit
acba2816e2
  1. 10
      crontab/cleaner.php

10
crontab/cleaner.php

@ -41,10 +41,10 @@ $logsCleanerDeleted = 0; @@ -41,10 +41,10 @@ $logsCleanerDeleted = 0;
$logsCrawlerDeleted = 0;
// Begin update
try {
$db->beginTransaction();
try {
// Get cleaner queue
foreach ($db->getCleanerQueue(CLEAN_HOST_LIMIT, time() - CLEAN_HOST_SECONDS_OFFSET) as $host) {
@ -239,16 +239,10 @@ if (CLEAN_DB_TABLES_OPTIMIZATION) { @@ -239,16 +239,10 @@ if (CLEAN_DB_TABLES_OPTIMIZATION) {
try {
$db->beginTransaction();
$db->optimize();
$db->commit();
} catch (Exception $e) {
$db->rollBack();
var_dump($e);
}
}

Loading…
Cancel
Save