Commit 68af43ea by 杨树贤

fix

parent eb3dc441
Showing with 9 additions and 1 deletions
......@@ -1302,6 +1302,9 @@ class SupplierService
{
ini_set('memory_limit', -1);
set_time_limit(0);
ignore_user_abort(true);
ob_implicit_flush(true);
$supplierService = new self();
$adminUserService = new AdminUserService();
......@@ -1310,7 +1313,7 @@ class SupplierService
$isProdMode = ($mode === 'prod');
// 构建查询
$query = SupplierChannelModel::where('is_type', 0)->where('supplier_id','>',12323)
$query = SupplierChannelModel::where('is_type', 0)->where('supplier_id','>',13856)
->where('yunxin_channel_uid', '!=', '');
// 如果num>0则限制数量,否则不限制
......@@ -1332,6 +1335,11 @@ class SupplierService
foreach ($suppliers as $supplier) {
try {
// 每100条重连数据库防止超时
if ($result['total'] > 0 && $result['total'] % 100 == 0) {
\DB::reconnect('web');
}
$result['total']++;
$supplierId = $supplier->supplier_id;
$yunxinChannelUid = $supplier->yunxin_channel_uid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment