Browse Source

修复最后一页评论入库失败问题

pull/88/head
longchao 2 days ago
parent
commit
2875e6785a
  1. 1
      model/mWeiboComments.php
  2. 1
      queue/deal/spider_weibo_comment.php

1
model/mWeiboComments.php

@ -134,6 +134,7 @@ class mWeiboComments extends mBase {
$rdata['total_number'] = $source_data['total_number']+0;
$rdata['max_id'] = $max_id;
$rdata['weibo_id'] = $weibo_id;
$rdata['weibo_id'] = empty($source_data['data']) ? 0 : count($source_data['data']);
$rdata['is_load_all'] = count($source_data['data']) <= 0 ? true : false;
if(empty($source_data['data']) || count($source_data['data']) <= 0) return $rdata;

1
queue/deal/spider_weibo_comment.php

@ -108,6 +108,7 @@ class spiderWeiboComment extends dealBase {
}
$cobj = new mWeiboComments();
$res = $cobj->addComment($weibo_id, $res);
if(!$res) {
$error = $cobj->getError().'|评论json数据保存到数据库失败~';

Loading…
Cancel
Save