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