Feed--redis调用链
2016-10-28 16:35:20 0 举报feed/Feed.php:971/973/975-->delFriendFeedInbox
feed/Feed.php:1042:-->_popInbox
feed/Feed.php:1107-->clearFeedMessage
// get request data
$arrRequest = array(
'user_id' => $user_id,
'timeline' => $this->_timeLine,
'limit' => $limit,
'bduss' => $arrCookie['BDUSS'],
);
$arrResponse = Tieba_Service::call('friend', 'getFriendFeedFromDb', $arrRequest, null, null, 'post', 'php', 'utf-8');
//清理收件箱未读
$arrRequest = array('user_id' => $user_id);
self::clearFeedMessage($arrRequest);
$strKey = Libs_Feed::buildFeedMsgRedisKey($arrInput);
$arrRedisInput = array('key' => $strKey, 'value' => 0);
$arrReturn = $objRedis->SET($arrRedisInput);
feed/Feed.php:1202:hideUserFeed-->hideOrOpenUserFeed
feed/Feed.php:1259/1292/1296-->_updateFeedByGz
feed/Feed.php:217--> getFriendFeedFromInboxByTimeline
feed/Feed.php:1010-->pushFriendFeedInbox
addFriendFeed
nmqCommitFriendFeed
feed/Feed.php:1075-->getFeedMessage
empty($reqs); $arrCommonReq = array(
'intUserId' => $this->intUserId,
'intClientType' => $this->intClientType,
'client_version' => $this->strClientVersion,
'intLastCommonMid' => $intLastCommonMid,
);
$arrCommonMsgRes = Lib_Util_Service::call('im', "getCommonMsg", $arrCommonReq);
$arrMultiInput = array(
'serviceName' => 'im',
'method' => 'getCommonMsg',
'ie' => 'utf-8',
'input' => $commonReq,
);
$tmpKey = 'im_getCommonMsg';
$objRalMulti->register($tmpKey, new Tieba_Service('im'), $arrMultiInput);
//Client为20 说明来自PC
if( $intClientType != 20){
$arrInput= array(
"user_id" => $intUserId,
);
$ret = Lib_Util_Service::call('messagepool', "getMsg", $arrInput);
if(!$ret || $ret['errno'] !== Tieba_Errcode::ERR_SUCCESS ) {
//$this->_error(Tieba_Errcode::ERR_CALL_SERVICE_FAIL);
$arrMessage = array();
Lib_Util_Log::warning('call getAllMessage failed. req:'.serialize($arrInput).' res:'.serialize($ret));
}
else {
$arrMessage = $ret['data'];
}
$ret = Lib_Util_Service::call('friend', 'getFeedMessage', array('user_id' => $intUserId));
//读取未读消息数
$strKey = Libs_Feed::buildFeedMsgRedisKey($arrInput);
$arrRedisInput = array('key' => $strKey);
$arrReturn = $objRedis->GET($arrRedisInput);
feed/Feed.php:1175-->openUserFeed-->hideOrOpenUserFeed
$arrInput['friend_id'] = intval($friend_id);
$arrInput['user_id'] = $uid;
$arrInput['type'] = $type;
$arrOut = Tieba_Service::call('friend','hideOrOpenUserFeed',$arrInput,NULL,NULL,'post','php','utf-8');
$zremReqs[] = array(
'key' => $strKey,
'member' => array($friend_id),
);
$input = array('reqs' => $zremReqs);
$objRedis = self::_getRedis();
$res = $objRedis->ZREM($input);
elseif( $type === 0 ){
$arr_open = self::openUserFeed($input);
if($arr_open['errno'] != 0){
$errno = self::OPERATION_USER_FEED_FAIL;
$errMsg = 'open user feed false';
}
}
feed/Feed.php:1219:-->getUserFeedList
getFriendFeedByTimeline
feed/Feed.php:1335/1385/1389: -->_updateFeedByShort