Exemplo n.º 1
0
 /**
  * 获取实例
  *
  * @return Bll_House_UpDown_RedisCount
  */
 public static function get_instance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 /**
  * 每分钟处理量
  */
 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);
 }
Exemplo n.º 3
0
 /**
  * 每分钟处理量
  * @return array
  */
 private function getUpDownDealDataCount()
 {
     return Bll_House_UpDown_RedisCount::get_instance()->queues();
 }