From 7722d32812ee998b1db5fde6c466041dc87dd63b Mon Sep 17 00:00:00 2001 From: ProklUng Date: Tue, 13 Jul 2021 14:48:25 +0300 Subject: [PATCH] Fixes --- README.md | 1 + install/bin/rabbitmq | 6 ++++-- lib/Command/RpcServerCommand.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3c25a53..fa88704 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,7 @@ class UploadPictureConsumer implements ConsumerInterface * `bitrix-rabbitmq:purge` Purge a consumer's queue * `bitrix-abbitmq:setup-fabric` Sets up the Rabbit MQ fabric * `bitrix-rabbitmq:stdin-producer` Executes a producer that reads data from STDIN +* `bitrix-rabbitmq:rpc-server` Start RPC server В папке `/install/bin` модуля лежит файл `rabbitmq`. При установке модуля система попробует скопировать его в директорию, `bin`, лежащую двумя уровнями выше `DOCUMENT_ROOT`. Если такой директории не существует, то сделано ничего не будет. Придется diff --git a/install/bin/rabbitmq b/install/bin/rabbitmq index f5e5865..3f176ed 100644 --- a/install/bin/rabbitmq +++ b/install/bin/rabbitmq @@ -26,7 +26,6 @@ define('NO_AGENT_STATISTIC', 'Y'); define('NO_AGENT_CHECK', true); defined('PUBLIC_AJAX_MODE') || define('PUBLIC_AJAX_MODE', true); - /** @noinspection PhpIncludeInspection */ require_once $autoloadPath; @@ -63,7 +62,10 @@ if ($bitrixStatus !== 200) { Loader::includeModule('proklung.rabbitmq'); -$commands = CommandsSetup::load(Services::getInstance()); +$services = new Services(); +$services->load(); + +$commands = CommandsSetup::load($services->getContainer()); $application = new ConsoleCommandConfigurator( new Application(), diff --git a/lib/Command/RpcServerCommand.php b/lib/Command/RpcServerCommand.php index 7f63460..5d0363c 100644 --- a/lib/Command/RpcServerCommand.php +++ b/lib/Command/RpcServerCommand.php @@ -42,7 +42,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $this->getContainer() - ->get(sprintf('old_sound_rabbit_mq.%s_server', $input->getArgument('name'))) + ->get(sprintf('rabbitmq.%s_server', $input->getArgument('name'))) ->start($amount); return 0;