From 99a05900b103a33ff3a9c5c75684cfcff0d37866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Fri, 15 Nov 2019 15:01:31 +0100 Subject: [PATCH] Fix the queue:restart command (#1932) Adding a proxy callStatic on our simple implementation of the Manager class allows passing through calls like `forever()` to the underlying cache driver instance. --- src/Queue/QueueServiceProvider.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Queue/QueueServiceProvider.php b/src/Queue/QueueServiceProvider.php index de7f6905a..6b9830693 100644 --- a/src/Queue/QueueServiceProvider.php +++ b/src/Queue/QueueServiceProvider.php @@ -33,7 +33,7 @@ class QueueServiceProvider extends AbstractServiceProvider Commands\ForgetFailedCommand::class, Console\ListenCommand::class, Commands\ListFailedCommand::class, -// Commands\RestartCommand::class, + Commands\RestartCommand::class, Commands\RetryCommand::class, Commands\WorkCommand::class, ]; @@ -87,6 +87,11 @@ class QueueServiceProvider extends AbstractServiceProvider { return $this->app['cache.store']; } + + public function __call($name, $arguments) + { + return call_user_func_array([$this->driver(), $name], $arguments); + } }; });