作者 赵彬吉

update

@@ -103,7 +103,7 @@ class QuanqiusouApi @@ -103,7 +103,7 @@ class QuanqiusouApi
103 Cache::put($key, $res, 2 * 3600); 103 Cache::put($key, $res, 2 * 3600);
104 } 104 }
105 } catch (\Exception | GuzzleException $e) { 105 } catch (\Exception | GuzzleException $e) {
106 - errorLog('获取谷歌排名数据失败', $api_no, $e); 106 + errorLog('获取谷歌排名数据失败', [$api_no], $e);
107 return false; 107 return false;
108 } 108 }
109 } 109 }
@@ -371,7 +371,7 @@ class RankDataLogic extends BaseLogic @@ -371,7 +371,7 @@ class RankDataLogic extends BaseLogic
371 if (!$model || $model->updated_date != date('Y-m-d') || $force) { 371 if (!$model || $model->updated_date != date('Y-m-d') || $force) {
372 $res = $api->getGoogleRank($api_no, 0, 7, $force); 372 $res = $api->getGoogleRank($api_no, 0, 7, $force);
373 if (!$res) { 373 if (!$res) {
374 - throw new \Exception('接口数据获取失败'); 374 + throw new \Exception("接口数据获取失败,api_no:{$api_no}");
375 } 375 }
376 //收录数 376 //收录数
377 $indexed_pages_num = $site_res[$api_no] ?? 0; 377 $indexed_pages_num = $site_res[$api_no] ?? 0;
@@ -384,7 +384,7 @@ class RankDataLogic extends BaseLogic @@ -384,7 +384,7 @@ class RankDataLogic extends BaseLogic
384 if (!$model || $model->updated_date != date('Y-m-d') || $force) { 384 if (!$model || $model->updated_date != date('Y-m-d') || $force) {
385 $res = $api->getGoogleRank($api_no, 1, 7, $force); 385 $res = $api->getGoogleRank($api_no, 1, 7, $force);
386 if (!$res) { 386 if (!$res) {
387 - throw new \Exception('接口数据获取失败'); 387 + throw new \Exception("接口数据获取失败,api_no:{$api_no},lang");
388 } 388 }
389 $data = []; 389 $data = [];
390 //不同的小语种取出来 390 //不同的小语种取出来