mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 10:14:04 +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 {
|
} else {
|
||||||
$manager->createDatabase($database);
|
$manager->createDatabase($database);
|
||||||
foreach ($afterCreating as $callback) {
|
foreach ($afterCreating as $item) {
|
||||||
$callback($tenant);
|
if (is_object($item)) {
|
||||||
|
$item->handle($tenant);
|
||||||
|
} else {
|
||||||
|
$item($tenant);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue