|
@@ -111,6 +111,7 @@ class pdlog_clear_all
|
|
|
|
|
|
$batch_handler = function ($minid, $maxid) use($batch_finder,$batch_checker,$batch_delter)
|
|
|
{
|
|
|
+ $index = 0;
|
|
|
$count = 0;
|
|
|
$batch_logs = $batch_finder($minid,$maxid);
|
|
|
foreach ($batch_logs as $logs)
|
|
@@ -120,6 +121,12 @@ class pdlog_clear_all
|
|
|
$batch_delter($logids);
|
|
|
$count += count($logids);
|
|
|
Log::record("del pd_log lines={$count}",Log::DEBUG);
|
|
|
+
|
|
|
+ $index += 1;
|
|
|
+ if($index % 100 === 0) {
|
|
|
+ Log::record("del pd_log index={$index}",Log::DEBUG);
|
|
|
+ sleep(2);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|