This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _retry($function, $params, $max = 3) { | |
$this->_retry++; | |
if ($this->_retry >= $max) { | |
$this->_retry = 0; | |
Hades_Tool_Log::logRun("p:{$this->_processNumber}|retry_max|function:" . json_encode($function) . "|params:" . json_encode($params), false, __FUNCTION__, $this->_className, Hades_Tool_Log::TYPE_EVE); | |
return false; | |
} | |
usleep(20000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function _sort($arr = array(), $sort_filed = '', $sort_direction = self::HOT_LIST_SORT_ASC) { | |
$sort = array( | |
'direction' => $sort_direction, //排序顺序标志,SORT_DESC:降序,SORT_ASC:升序 | |
'field' => $sort_filed, //排序字段 | |
); | |
$arr_sort = array(); | |
foreach ($arr as $uniqid => $row) { | |
foreach ($row as $k => $v) { | |
$arr_sort[$k][$uniqid] = $v; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sprintf("%u%04u", substr(sprintf("%.0f", microtime(true) * 1000000), 5), rand(0, 9999)) |
OlderNewer