mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:14:03 +00:00
Fix chained jobs
This commit is contained in:
parent
4196d918d6
commit
9671e1e29d
1 changed files with 7 additions and 3 deletions
|
|
@ -161,11 +161,15 @@ class DatabaseManager
|
|||
}
|
||||
}
|
||||
|
||||
QueuedTenantDatabaseCreator::withChain($afterCreating)->dispatch($manager, $database);
|
||||
QueuedTenantDatabaseCreator::withChain($chain)->dispatch($manager, $database);
|
||||
} else {
|
||||
$manager->createDatabase($database);
|
||||
foreach ($afterCreating as $callback) {
|
||||
$callback($tenant);
|
||||
foreach ($afterCreating as $item) {
|
||||
if (is_object($item)) {
|
||||
$item->handle($tenant);
|
||||
} else {
|
||||
$item($tenant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue