ayHaru 4 سال پیش
والد
کامیت
8b8b217586
4فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 0 0
      queue/.gitignore
  2. 0 0
      queue/config.windows.php
  3. 1 1
      queue/index.php
  4. 4 3
      queue/queuehandler.php

+ 0 - 0
queue/.gitignore


+ 0 - 0
queue/config.windows.php


+ 1 - 1
queue/index.php

@@ -7,7 +7,7 @@ use queuehandler;
 
 // 加载基础文件
 require __DIR__ . '/../thinkphp/base.php';
-
+echo 11;
 define('BASE_ROOT_PATH',str_replace('/queue','',dirname(__FILE__)));
 define('BASE_PATH',BASE_ROOT_PATH . '/queue');
 

+ 4 - 3
queue/queuehandler.php

@@ -3,6 +3,7 @@ declare(strict_types=0);
 
 //此行代码会导致bug
 //ini_set('default_socket_timeout', -1);
+use think\facade\Log;
 
 class queuehandler
 {
@@ -14,7 +15,6 @@ class queuehandler
         $queue_name = $config['net_queue']['name'];
         $host = $config['net_queue']['host'];
         $port = $config['net_queue']['port'];
-
         if (ob_get_level()) ob_end_clean();
 
         pcntl_signal(SIGINT,  [$this,'sig_handler']);
@@ -24,15 +24,16 @@ class queuehandler
 
         $logic_queue = new queue_logic();
         $worker = new QueueServer($queue_name,$host,$port);
-        $queues = $worker->scan();
 
+        $queues = $worker->scan();
+        echo $queues;
         while (true)
         {
             pcntl_signal_dispatch();
             try
             {
                 if ($this->_stop) break;
-
+                echo 2;
                 $content = $worker->pop($queues, 1);
                 if(is_array($content))
                 {