stanley-king 2 年之前
父節點
當前提交
f364dd9098
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      helper/refill/ops/pdlog_clear_refill.php

+ 7 - 0
helper/refill/ops/pdlog_clear_refill.php

@@ -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);
+                    }
                 }
             }
         };