/** * 获取实例 * * @return Bll_House_UpDown_RedisCount */ public static function get_instance() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; }
/** * 每分钟处理量 */ private function currentDataCount() { $currentTime = strtotime(date('Y-m-d H:i')); $countKey = Bll_House_UpDown_RedisCount::QUEUE_PREFIX . $currentTime; Bll_House_UpDown_RedisCount::get_instance()->incrKey($countKey); Bll_House_UpDown_RedisCount::get_instance()->setExpire($countKey, 86400); // file_put_contents("/data1/logs/worker.log",$countKey."\n",FILE_APPEND); }
/** * 每分钟处理量 * @return array */ private function getUpDownDealDataCount() { return Bll_House_UpDown_RedisCount::get_instance()->queues(); }