stanley-king 3 years ago
parent
commit
bc38637c17
2 changed files with 7 additions and 0 deletions
  1. 4 0
      helper/queue/iqueue.php
  2. 3 0
      rdispatcher/coall.php

+ 4 - 0
helper/queue/iqueue.php

@@ -243,11 +243,13 @@ abstract class ILooper
         do{
             Swoole\Coroutine::sleep(0.1);
         } while($this->_pause == 1);
+        Log::record("runloop cid={$this->_cid}",Log::DEBUG);
     }
 
     public function resume()
     {
         if($this->_pause == 2) {
+            Log::record("runloop cid={$this->_cid}",Log::DEBUG);
             Swoole\Coroutine::resume($this->_cid);
             $this->_pause = 0;
         }
@@ -262,6 +264,8 @@ abstract class ILooper
     public function run()
     {
         $this->_cid = Swoole\Coroutine::getPcid();
+        Log::record("runloop cid={$this->_cid}",Log::DEBUG);
+
         $queues = $this->mServer->scan();
         while (true)
         {

+ 3 - 0
rdispatcher/coall.php

@@ -82,7 +82,10 @@ function subscribe_message(&$quit, &$redis, $channels,$looper)
 
                 if($type == 'channel' || $type == 'merchant') {
                     $looper->pause();
+                    Log::record("start load.....",Log::DEBUG);
                     refill\RefillFactory::instance()->load();
+                    Log::record("fini load.....",Log::DEBUG);
+
                     $looper->resume();
                 }
                 elseif($type == 'ratio') {