Skip to content
1 change: 1 addition & 0 deletions src/cli/VerboseBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function beforeExec(ExecEvent $event)
$this->command->stdout($this->jobTitle($event), Console::FG_GREY);
$this->command->stdout(' - ', Console::FG_YELLOW);
$this->command->stdout('Started', Console::FG_GREEN);
$this->command->stdout(' (params:' . json_encode($event->job, JSON_UNESCAPED_UNICODE) . ')');
$this->command->stdout(PHP_EOL);
}

Expand Down
6 changes: 4 additions & 2 deletions src/drivers/amqp_interop/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Interop\Amqp\AmqpQueue;
use Interop\Amqp\AmqpTopic;
use Interop\Amqp\Impl\AmqpBind;
use Yii;
use yii\base\Application as BaseApp;
use yii\base\Event;
use yii\base\NotSupportedException;
Expand Down Expand Up @@ -295,8 +296,7 @@ public function init()
$oldHandler($signal);
}

pcntl_signal($signal, SIG_DFL);
posix_kill(posix_getpid(), $signal);
Yii::$app->end();
});
}
}
Expand All @@ -314,6 +314,7 @@ public function listen()
$consumer = $this->context->createConsumer($queue);

$callback = function (AmqpMessage $message, AmqpConsumer $consumer) {
pcntl_signal_dispatch();
if ($message->isRedelivered()) {
$consumer->acknowledge($message);

Expand All @@ -332,6 +333,7 @@ public function listen()

$this->redeliver($message);
}
pcntl_signal_dispatch();

return true;
};
Expand Down