Commit 61583706 authored by hangjun83's avatar hangjun83

队列更新

parent 72a00611
......@@ -58,22 +58,31 @@ class InteglePlatformService
public function batchUpdateApi($updateData)
{
$result = $this->apiService->pushBatchUpdateProduct($updateData);
if($result){
if($result['status'] === false){
$this->apiService->pushQueue([
'consumer' => 'App\Services\InteglePlatformService',
'method' => 'batchUpdateApi',
'params' => $updateData
],'integle');
}
}
unset($result['status']);
try{
$result = $this->apiService->pushBatchUpdateProduct($updateData);
/*if($result){
if($result['status'] === false){
$this->apiService->pushQueue([
'consumer' => 'App\Services\InteglePlatformService',
'method' => 'batchUpdateApi',
'params' => $updateData
],'integle');
}
}*/
unset($result['status']);
$logsContent = [
'apiParams' => $updateData,
'apiReturn' => $result
];
SimpleLogs::writeLog($logsContent,__CLASS__.':batchUpdateApi');
$logsContent = [
'apiParams' => $updateData,
'apiReturn' => $result
];
SimpleLogs::writeLog($logsContent,__CLASS__.':batchUpdateApi');
}catch(\Throwable $exception){
$this->apiService->pushQueue([
'consumer' => 'App\Services\InteglePlatformService',
'method' => 'batchUpdateApi',
'params' => $updateData
],'integle');
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':batchUpdateApi', '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