<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # 高階篇二 之 Worker隊列基類源碼 ~~~ <?php /** * Created by PhpStorm. * Power By Mikkle * Email:776329498@qq.com * Date: 2017/8/7 * Time: 9:28 */ namespace app\worker\controller; use app\base\controller\Redis; use think\Config; use think\Controller; abstract class Base { protected $redis; protected $workList; protected $workerName; public static $instance; /** * Base constructor. * @param array $options */ public function __construct($options=[]) { $this->redis = $this->redis(); $this->workList = "worker_list"; $this->workerName = get_called_class(); } /** * redis加載自定義Redis類 * Power: Mikkle * Email:776329498@qq.com * @param array $options * @return Redis */ protected static function redis($options=[]){ $options = empty($options) ? $redis = Config::get("command.redis") : $options; return Redis::instance($options); } /** * 標注命令行執行此任務 * Power: Mikkle * Email:776329498@qq.com */ public function runWorker(){ $this->redis->hset($this->workList,$this->workerName,$this->workerName); } /** * 標注命令行清除此任務 * Power: Mikkle * Email:776329498@qq.com */ public function clearWorker(){ $this->redis->hdel($this->workList,$this->workerName); } /** * Power: Mikkle * Email:776329498@qq.com * @param array $options * @return static */ static public function instance($options=[]){ if (isset(self::$instance)){ return self::$instance; }else{ return new static($options); } } } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看