mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:14:03 +00:00
Rename variables in CreatePendingTenants
This commit is contained in:
parent
c6161f6997
commit
c44a4c56d5
1 changed files with 5 additions and 5 deletions
|
|
@ -29,22 +29,22 @@ class CreatePendingTenants extends Command
|
|||
{
|
||||
$this->info('Deploying pending tenants.');
|
||||
|
||||
$pendingObjectifCount = (int) ($this->option('count') ?? config('tenancy.pending.count'));
|
||||
$maxPendingTenantCount = (int) ($this->option('count') ?? config('tenancy.pending.count'));
|
||||
|
||||
$pendingCurrentCount = $this->getPendingTenantCount();
|
||||
$pendingTenantCount = $this->getPendingTenantCount();
|
||||
|
||||
$deployedCount = 0;
|
||||
while ($pendingCurrentCount < $pendingObjectifCount) {
|
||||
while ($pendingTenantCount < $maxPendingTenantCount) {
|
||||
tenancy()->model()::createPending();
|
||||
// Update the number of pending tenants every time with a query to get a live count
|
||||
// To prevent deploying too many tenants if pending tenants are being created simultaneously somewhere else
|
||||
// While running this command
|
||||
$pendingCurrentCount = $this->getPendingTenantCount();
|
||||
$pendingTenantCount = $this->getPendingTenantCount();
|
||||
$deployedCount++;
|
||||
}
|
||||
|
||||
$this->info($deployedCount . ' ' . str('tenant')->plural($deployedCount) . ' deployed.');
|
||||
$this->info($pendingObjecifCount . ' ' . str('tenant')->plural($pendingObjectifCount) . ' ready to be used.');
|
||||
$this->info($maxPendingTenantCount . ' ' . str('tenant')->plural($maxPendingTenantCount) . ' ready to be used.');
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue