Commit 679f38fa authored by hj's avatar hj

更新提交

parent 20e88d4a
...@@ -167,8 +167,8 @@ class CheMenuService ...@@ -167,8 +167,8 @@ class CheMenuService
SimpleLogs::writeLog('数据解析结束。数据:'.json_encode($productPageContent, JSON_UNESCAPED_UNICODE), 'chemenu info', 'info'); SimpleLogs::writeLog('数据解析结束。数据:'.json_encode($productPageContent, JSON_UNESCAPED_UNICODE), 'chemenu info', 'info');
$this->apiService->saveProduct($productPageContent); $this->apiService->saveProduct($productPageContent);
} }
$randomFloat = 5 + mt_rand(0, 5) + (mt_rand(0, 999) / 1000);
usleep(rand(50000,150000)); usleep($randomFloat * 1000000); // 微秒级延迟
} }
}catch(\Throwable $exception){ }catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), 'chemenu error', 'error'); SimpleLogs::writeLog($exception->getMessage(), 'chemenu error', 'error');
......
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 to comment