From 1772a88c8cfcb2ac192f2b4acfee71c6b5c93267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20CROMBEZ?= <777666+jcrombez@users.noreply.github.com> Date: Mon, 24 Aug 2020 16:28:11 +0200 Subject: [PATCH] [async-command] 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/pkg/async-command/DependencyInjection/AsyncCommandExtension.php b/pkg/async-command/DependencyInjection/AsyncCommandExtension.php index d1f4157a2..c1a0fa8f8 100644 --- a/pkg/async-command/DependencyInjection/AsyncCommandExtension.php +++ b/pkg/async-command/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,