mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-15 08:24:05 +00:00
Clean up
This commit is contained in:
parent
cbaa775876
commit
c9903cd43c
19 changed files with 212 additions and 215 deletions
|
|
@ -39,7 +39,7 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
|
|||
foreach ($this->app['config']['tenancy.filesystem.disks'] as $disk) {
|
||||
$this->originalPaths['disks'][$disk] = Storage::disk($disk)->getAdapter()->getPathPrefix();
|
||||
|
||||
if ($root = \str_replace('%storage_path%', storage_path(), $this->app['config']["tenancy.filesystem.root_override.{$disk}"])) {
|
||||
if ($root = str_replace('%storage_path%', storage_path(), $this->app['config']["tenancy.filesystem.root_override.{$disk}"])) {
|
||||
Storage::disk($disk)->getAdapter()->setPathPrefix($root);
|
||||
} else {
|
||||
$root = $this->app['config']["filesystems.disks.{$disk}.root"];
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
|||
|
||||
$this->app['queue']->createPayloadUsing([$this, 'createPayload']);
|
||||
$this->app['events']->listen(\Illuminate\Queue\Events\JobProcessing::class, function ($event) {
|
||||
if (\array_key_exists('tenant_id', $event->job->payload())) {
|
||||
if (array_key_exists('tenant_id', $event->job->payload())) {
|
||||
tenancy()->initById($event->job->payload()['tenant_id']);
|
||||
}
|
||||
});
|
||||
|
|
@ -50,7 +50,7 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper
|
|||
'tenant_id' => $id,
|
||||
'tags' => [
|
||||
"tenant:$id",
|
||||
// todo2 domain
|
||||
// todo3 domain
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue