Commit 61583706 authored by hangjun83's avatar hangjun83

队列更新

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