private function rpcMonitor() { if (defined('SHOWMONITORS') && SHOWMONITORS) { $showMonitors = JMRegistry::get('ShowMonitors'); if (isset($showMonitors['Monitors']) && isset($showMonitors['Monitors']['rpc']) && isset($showMonitors['Monitors']['rpc']['show']) && $showMonitors['Monitors']['rpc']['show']) { if ($this->lastResponseText) { $protocol = $this->protocol === null ? self::$Default_Protocol : $this->protocol; if ($protocol == self::Protocol_Json) { $temp = @json_decode($this->lastResponseText, true); } elseif ($protocol == self::Protocol_Php) { $temp = @unserialize($this->lastResponseText); } else { $temp = $this->lastResponseText; } } $classAndFunction = 'Class:' . $this->rpcClass . ' Method:' . $this->currentMethodName; Utility_Monitors::rpcMonitorCllbackByStack($classAndFunction, $this->arguments, $temp); } } }
/** * Author: WenJun * Date: 2013-02-22 上午10:03 * Email: wenjun1055@gmail.com * * File: comment_filter_check_everyday.php * Desc: 每天运行一次,纠正程序自动屏蔽评论的错误问题 */ if (!defined('SHOWMONITORS')) { define('SHOWMONITORS', false); } require_once dirname(__FILE__) . '/../../Koubei/config.inc.php'; require_once JM_FRAMEWORK_ROOT . 'JMFrameworkConsole.php'; JMRegistry::set('serverConfig', $serverConfig); JMRegistry::set('rpcServer', $rpcServer); JMRegistry::set('monoLogger', $monoLogger); $dbRW = new JMDbMysqlReadWriteSplit(); $dbRW->addMaster(JMDbMysql::GetConnection(DATABASE)); $redis = JMRedis::getConnectionByName('local'); $rpcClient = new JMRpcClient('filter_comment'); $rpcClient->_setClass('Comment'); $sphinx = Utility_SphinxClient::Connection(); $sphinx->ResetFilters(); $allWordCounter = 0; $healthArray = array(); $spamArray = array(); $allArray = array(); function utfSubstr($str) { for ($i = 0; $i < 30; $i++) { $tempStr = substr($str, 0, 1);