stanley-king 3 年之前
父節點
當前提交
cba49fbd6e
共有 2 個文件被更改,包括 7 次插入7 次删除
  1. 3 3
      helper/queue/iqueue.php
  2. 4 4
      rdispatcher/coall.php

+ 3 - 3
helper/queue/iqueue.php

@@ -246,7 +246,7 @@ abstract class ILooper
     {
         $this->_pause = false;
         if($this->_cid > 0) {
-            Co::resume($this->_cid);
+            Swoole\Coroutine::resume($this->_cid);
         }
     }
 
@@ -258,14 +258,14 @@ abstract class ILooper
 
     public function run()
     {
-        $this->_cid = Co::getPcid();
+        $this->_cid = Swoole\Coroutine::getPcid();
         $queues = $this->mServer->scan();
         while (true)
         {
             try
             {
                 if($this->_pause) {
-                    Co::suspend();
+                    Swoole\Coroutine::suspend();
                 }
                 if ($this->_stop) break;
 

+ 4 - 4
rdispatcher/coall.php

@@ -12,18 +12,18 @@ define('BASE_PATH',BASE_ROOT_PATH . '/rdispatcher');
 require_once(BASE_ROOT_PATH . '/global.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
 
+require_once(BASE_HELPER_PATH . '/algorithm.php');
 require_once(BASE_HELPER_PATH . '/event_looper.php');
 require_once(BASE_HELPER_PATH . '/queue/rdispatcher.php');
-require_once(BASE_HELPER_PATH . '/algorithm.php');
 require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
-require_once(BASE_PATH . '/processor.php');
-require_once(BASE_PATH . '/proxy.php');
-
 require_once(BASE_CORE_PATH . '/framework/libraries/CoRefPool.php');
 require_once(BASE_CORE_PATH . '/framework/libraries/CoMysqliPool.php');
 require_once(BASE_CORE_PATH . '/framework/libraries/CoPool.php');
 require_once(BASE_CORE_PATH . '/framework/libraries/CoRedisPool.php');
 
+require_once(BASE_PATH . '/processor.php');
+require_once(BASE_PATH . '/proxy.php');
+
 Co::set(['hook_flags' => SWOOLE_HOOK_ALL | SWOOLE_HOOK_NATIVE_CURL]);
 if (empty($_SERVER['argv'][1])) exit('parameter error');
 $process_count = intval($_SERVER['argv'][1]);