Fixes issue with the worker defaulting to the illuminate queue manager (#2481)

We are instantiating our own queue handling factory which returns the
flarum.queue.connection binding no matter what. The queue Worker and
other queue related code rely on this manager to get its thing going.
Therefor we need to re-use our own factory everywhere, including in
the worker.
This commit is contained in:
Daniël Klabbers 2020-12-02 19:19:25 +01:00 committed by GitHub
parent 984f751c71
commit 641619e820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,6 @@ use Illuminate\Queue\Console as Commands;
use Illuminate\Queue\Events\JobFailed;
use Illuminate\Queue\Failed\NullFailedJobProvider;
use Illuminate\Queue\Listener as QueueListener;
use Illuminate\Queue\QueueManager;
use Illuminate\Queue\SyncQueue;
use Illuminate\Queue\Worker;
@ -66,7 +65,7 @@ class QueueServiceProvider extends AbstractServiceProvider
$config = $app->make(Config::class);
return new Worker(
new QueueManager($app),
$app[Factory::class],
$app['events'],
$app[ExceptionHandling::class],
function () use ($config) {