From 94f3fb0261426125c47b8fd93670f782110275c7 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Sat, 3 Aug 2024 14:28:05 +0200 Subject: [PATCH] cronjobs/cleaner.php removed shopimport_amazon_fees --- cronjobs/cleaner.php | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/cronjobs/cleaner.php b/cronjobs/cleaner.php index 4c0759e0..85c4a1ff 100644 --- a/cronjobs/cleaner.php +++ b/cronjobs/cleaner.php @@ -148,8 +148,7 @@ $tables = [ 'templatemessage', 'shopimport_auftraege', 'versandzentrum_log', - 'api_request_response_log', - 'shopimport_amazon_fees', + 'api_request_response_log' ]; $minMemoryMb = 1; $minMemory = $minMemoryMb * 1024 * 1024; @@ -623,34 +622,11 @@ if($shopExportLogCleanerActive && $tage > 0) { $shopExportLogCleanerActive = $app->erp->Firmendaten('cleaner_shopexportlog'); $tage = (int)$app->erp->Firmendaten('cleaner_shopexportlog_tage'); -$isToDelete = !empty($tableSchemaByTables['shopimport_amazon_fees']) - && !empty($tableSchemaByTables['shopimport_amazon_fees']['todelete']); -if((!$shopExportLogCleanerActive || $tage <= 0 || $tage > 30) && $isToDelete) { - $shopExportLogCleanerActive = true; - if($tage <= 0 || $tage > 30) { - $tage = 30; - } -} + if($shopExportLogCleanerActive && $tage > 0) { if($tage < 30) { $tage = 30; } - $app->DB->Delete( - sprintf( - "DELETE FROM `shopimport_amazon_fees` - WHERE DATE_SUB(NOW(), INTERVAL %d DAY) >= `zeitstempel` OR `zeitstempel` = '0000-00-00 00:00:00'", - $tage - ) - ); - $affectedRows = $app->DB->affected_rows(); - if(!empty($tableSchemaByTables['shopimport_amazon_fees']) - && ($tableSchemaByTables['shopimport_amazon_fees']['todelete'] > 0)) { - $tableSchemaByTables['shopimport_amazon_fees']['todelete'] -= $affectedRows; - } - if($affectedRows > 0 && !empty($optimize['shopimport_amazon_fees'])) { - $app->DB->Query('OPTIMIZE TABLE `shopimport_amazon_fees`'); - unset($optimize['shopimport_amazon_fees']); - } $app->DB->Update( "UPDATE prozessstarter SET letzteausfuerhung=NOW(),mutex=1,mutexcounter=0 WHERE parameter = 'cleaner' AND aktiv = 1" );