Commit 6afa776a authored by hj's avatar hj

更新提交

parent d3fa3676
......@@ -70,14 +70,14 @@ class CheMenuApiService extends PlatformAbstractService
], []);
return $this->returnResponse($response);
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), 'chemenu error', 'error');
/*SimpleLogs::writeLog($exception->getMessage(), 'chemenu error', 'error');
if(preg_match('/\{(?<response>[\s\S]*?)\}/i', $exception->getMessage(), $response)){
$response = json_decode('{'.$response['response'].'}', true);
if($response && $response['status'] == 429){
sleep(60);
$this->saveProduct($productContent);
}
}
}*/
$this->requestError($exception);
}
}
......
......@@ -234,6 +234,12 @@ class CheMenuService
}
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), 'chemenu error', 'error');
$productJobContent = [
'params' => ['content' => $productPageContent],
'consumer' => __CLASS__,
'method' => 'productSave'
];
$this->apiService->pushQueue($productJobContent,'chemenu_product_save');
}
}
}
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