1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:14:04 +00:00

Update QueueTenancyBootstrapper.php (#836)

This commit is contained in:
Roy de Vos Burchart 2022-04-01 22:53:09 +02:00 committed by GitHub
parent 349125c02e
commit f065ea60b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,8 +63,8 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
static::initializeTenancyForQueue($event->job->payload()['tenant_id'] ?? null); static::initializeTenancyForQueue($event->job->payload()['tenant_id'] ?? null);
}); });
if (Str::startsWith(app()->version(), '8')) { if (version_compare(app()->version(), '8.64', '>=')) {
// JobRetryRequested only exists since Laravel 8 // JobRetryRequested only exists since Laravel 8.64
$dispatcher->listen(JobRetryRequested::class, function ($event) use (&$previousTenant) { $dispatcher->listen(JobRetryRequested::class, function ($event) use (&$previousTenant) {
$previousTenant = tenant(); $previousTenant = tenant();