From 9405de1a8b9df3e8b8a6b656c43f2aaac310bfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20CROMBEZ?= <777666+jcrombez@users.noreply.github.com> Date: Tue, 21 Jul 2020 12:28:22 +0200 Subject: [PATCH] Fix service definition to apply the timeout `addArgument` add only one argument at a time to the construtor, right now the timeout configured by the user is never applied and it's always the default (60) value, this fixes it. --- DependencyInjection/AsyncCommandExtension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/AsyncCommandExtension.php b/DependencyInjection/AsyncCommandExtension.php index d1f4157..c1a0fa8 100644 --- a/DependencyInjection/AsyncCommandExtension.php +++ b/DependencyInjection/AsyncCommandExtension.php @@ -24,7 +24,8 @@ public function load(array $configs, ContainerBuilder $container) $id = sprintf('enqueue.async_command.%s.run_command_processor', $client['name']); $container->register($id, RunCommandProcessor::class) - ->addArgument('%kernel.project_dir%', $client['timeout']) + ->addArgument('%kernel.project_dir%') + ->addArgument($client['timeout']) ->addTag('enqueue.processor', [ 'client' => $client['name'], 'command' => $client['command_name'] ?? Commands::RUN_COMMAND,