-
-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Labels
type:bugBugBug
Milestone
Description
What steps will reproduce the problem?
- Make sure
PCNTL
extension is installed. - Configure queue using
enqueue/amqp-lib
so it can create the connection with RabbitMQreturn [ 'bootstrap' => ['queue'], 'components' => [ 'queue' => [ 'class' => \yii\queue\amqp_interop\Queue::class, 'driver' => yii\queue\amqp_interop\Queue::ENQUEUE_AMQP_LIB, 'host' => 'localhost', 'port' => 5672, 'user' => 'guest', 'password' => 'guest', 'queueName' => 'test', ], ], ];
- Run
php yii queue/listen
- Send
SIGINT
(CTRL+C
)
What's expected?
Listener should stop running
What do you get instead?
Nothing happens, disconnect event isn't sent to RabbitMQ.
Additional info
Queue is completely empty so it's not waiting for a job to finish before exiting.
This seems to happen because amqp-tools overwrites these signals with custom handlers. Setting up handlers as described in php-amqplib docs seems to stop the process as I'd expect it to.
Q | A |
---|---|
Yii version | 2.0.35 |
Yii-queue version | 2.3.0 |
enqueue/amqp-lib version | 0.10.1 |
PHP version | 7.4.5 |
Operating system | Debian 10 |
Metadata
Metadata
Assignees
Labels
type:bugBugBug