Ver Fonte

得润宝

cqp há 6 horas atrás
pai
commit
2e5ed4da2f
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      app/Console/Commands/U8Settle.php

+ 6 - 0
app/Console/Commands/U8Settle.php

@@ -132,6 +132,12 @@ class U8Settle extends Command
                     if(! empty($id)) Record::whereIn("id", $id)->update(['del_time' => 3]);
                 });
 
+            // ✅ 处理完所有 chunk 后统一关闭连接
+            foreach ($connections as $conn) {
+                if ($conn instanceof U8DatabaseServerService) {
+                    $conn->close();
+                }
+            }
         } catch (\Throwable $e) {
             Log::channel('apiLog')->info('U8数据更新异常', ['msg' => $e->getMessage()]);
         }