mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:44:02 +00:00
[4.x] Make RemoveStorageSymlinksAction able to delete broken symlinks (#1323)
* Add regression test for removing invalid symlinks * Move commented RemoveStorageSymlinks job to the DeletingTenant pipeline (better default - the symlinks will be removed *before* deleting tenant storage) * Remove symlink validity check from symlinkExists() (only check for the symlink's existence) * Delete complete todo0 * Make the symlink assertions more explicit * update test name --------- Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
8d87ee9dfc
commit
8cd15db1fc
3 changed files with 50 additions and 6 deletions
|
|
@ -53,6 +53,7 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
Events\DeletingTenant::class => [
|
||||
JobPipeline::make([
|
||||
Jobs\DeleteDomains::class,
|
||||
// Jobs\RemoveStorageSymlinks::class,
|
||||
])->send(function (Events\DeletingTenant $event) {
|
||||
return $event->tenant;
|
||||
})->shouldBeQueued(false),
|
||||
|
|
@ -62,7 +63,6 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
Events\TenantDeleted::class => [
|
||||
JobPipeline::make([
|
||||
Jobs\DeleteDatabase::class,
|
||||
// Jobs\RemoveStorageSymlinks::class,
|
||||
])->send(function (Events\TenantDeleted $event) {
|
||||
return $event->tenant;
|
||||
})->shouldBeQueued(false), // `false` by default, but you probably want to make this `true` for production.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue