Ejemplo n.º 1
0
 /**
  * 初始化对象
  */
 protected static function init($snId = 0)
 {
     if (!self::$client) {
         if (class_exists("GearmanClient")) {
             self::$client = new GearmanClient();
             foreach (self::$serverArr as $v) {
                 self::$client->addServers($v);
             }
         } else {
             die("Gearman 接口模块不可用");
         }
     }
 }