|
@@ -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))
|
|
|
{
|