Commit 61583706 authored by hangjun83's avatar hangjun83

队列更新

parent 72a00611
...@@ -58,8 +58,9 @@ class InteglePlatformService ...@@ -58,8 +58,9 @@ class InteglePlatformService
public function batchUpdateApi($updateData) public function batchUpdateApi($updateData)
{ {
try{
$result = $this->apiService->pushBatchUpdateProduct($updateData); $result = $this->apiService->pushBatchUpdateProduct($updateData);
if($result){ /*if($result){
if($result['status'] === false){ if($result['status'] === false){
$this->apiService->pushQueue([ $this->apiService->pushQueue([
'consumer' => 'App\Services\InteglePlatformService', 'consumer' => 'App\Services\InteglePlatformService',
...@@ -67,7 +68,7 @@ class InteglePlatformService ...@@ -67,7 +68,7 @@ class InteglePlatformService
'params' => $updateData 'params' => $updateData
],'integle'); ],'integle');
} }
} }*/
unset($result['status']); unset($result['status']);
$logsContent = [ $logsContent = [
...@@ -75,5 +76,13 @@ class InteglePlatformService ...@@ -75,5 +76,13 @@ class InteglePlatformService
'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