mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 04:34:03 +00:00
Horizon tags
This commit is contained in:
parent
330ea13efd
commit
fb5cdb3239
1 changed files with 9 additions and 1 deletions
|
|
@ -69,7 +69,15 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
public function makeQueuesTenantAware()
|
||||
{
|
||||
$this->app['queue']->createPayloadUsing(function () {
|
||||
return tenancy()->initialized ? ['tenant_uuid' => tenant('uuid')] : [];
|
||||
if (tenancy()->initialized) {
|
||||
$uuid = tenant('uuid');
|
||||
return [
|
||||
'tenant_uuid' => $uuid,
|
||||
'tags' => ["tenant:$uuid"],
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
});
|
||||
|
||||
$this->app['events']->listen(\Illuminate\Queue\Events\JobProcessing::class, function ($event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue