mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 06:44:37 -04:00
Remove dispatchSync
This commit is contained in:
parent
ad7889b769
commit
1e3b1c08da
@ -131,9 +131,9 @@ class CreateAccount extends Command
|
|||||||
'settings' => null,
|
'settings' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
CreateCompanyPaymentTerms::dispatchSync($company, $user);
|
(new CreateCompanyPaymentTerms($company, $user))->handle();
|
||||||
CreateCompanyTaskStatuses::dispatchSync($company, $user);
|
(new CreateCompanyTaskStatuses($company, $user))->handle();
|
||||||
VersionCheck::dispatchSync();
|
(new VersionCheck())->handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function warmCache()
|
private function warmCache()
|
||||||
|
@ -112,9 +112,9 @@ class DemoMode extends Command
|
|||||||
$this->info('Seeding Random Data');
|
$this->info('Seeding Random Data');
|
||||||
$this->createSmallAccount();
|
$this->createSmallAccount();
|
||||||
|
|
||||||
VersionCheck::dispatchSync();
|
(new VersionCheck())->handle();
|
||||||
|
|
||||||
CompanySizeCheck::dispatchSync();
|
(new CompanySizeCheck())->handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createSmallAccount()
|
private function createSmallAccount()
|
||||||
@ -164,8 +164,8 @@ class DemoMode extends Command
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateCompanyPaymentTerms::dispatchSync($company, $user);
|
(new CreateCompanyPaymentTerms($company, $user))->handle();
|
||||||
CreateCompanyTaskStatuses::dispatchSync($company, $user);
|
(new CreateCompanyTaskStatuses($company, $user))->handle();
|
||||||
|
|
||||||
$company_token = new CompanyToken;
|
$company_token = new CompanyToken;
|
||||||
$company_token->user_id = $user->id;
|
$company_token->user_id = $user->id;
|
||||||
|
@ -43,13 +43,13 @@ class HostedUsers extends Command
|
|||||||
{
|
{
|
||||||
Company::on('db-ninja-01')->each(function ($company) {
|
Company::on('db-ninja-01')->each(function ($company) {
|
||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
\Modules\Admin\Jobs\Account\NinjaUser::dispatchSync([], $company);
|
(new \Modules\Admin\Jobs\Account\NinjaUser([], $company))->handle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Company::on('db-ninja-02')->each(function ($company) {
|
Company::on('db-ninja-02')->each(function ($company) {
|
||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
\Modules\Admin\Jobs\Account\NinjaUser::dispatchSync([], $company);
|
(new \Modules\Admin\Jobs\Account\NinjaUser([], $company))->handle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,6 @@ class SendTestEmails extends Command
|
|||||||
$nmo->settings = $user->account->companies()->first()->settings;
|
$nmo->settings = $user->account->companies()->first()->settings;
|
||||||
$nmo->to_user = $user;
|
$nmo->to_user = $user;
|
||||||
|
|
||||||
NinjaMailerJob::dispatchSync($nmo);
|
(new NinjaMailerJob($nmo))->handle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ class ZipCredits implements ShouldQueue
|
|||||||
$path = $this->credits->first()->client->quote_filepath($invitation);
|
$path = $this->credits->first()->client->quote_filepath($invitation);
|
||||||
|
|
||||||
$this->credits->each(function ($credit) {
|
$this->credits->each(function ($credit) {
|
||||||
CreateEntityPdf::dispatchSync($credit->invitations()->first());
|
(new CreateEntityPdf($credit->invitations()->first()))->handle();
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -142,7 +142,7 @@ class TemplateEmail extends Mailable
|
|||||||
sleep(2);
|
sleep(2);
|
||||||
|
|
||||||
if(!Storage::disk(config('filesystems.default'))->exists($path)) {
|
if(!Storage::disk(config('filesystems.default'))->exists($path)) {
|
||||||
CreateEntityPdf::dispatchSync($this->invitation);
|
(new CreateEntityPdf($this->invitation))->handle();
|
||||||
sleep(2);
|
sleep(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ class InvoiceInvitation extends BaseModel
|
|||||||
|
|
||||||
if (! Storage::exists($this->invoice->client->invoice_filepath($this).$this->invoice->numberFormatter().'.pdf')) {
|
if (! Storage::exists($this->invoice->client->invoice_filepath($this).$this->invoice->numberFormatter().'.pdf')) {
|
||||||
event(new InvoiceWasUpdated($this->invoice, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
event(new InvoiceWasUpdated($this->invoice, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||||
CreateEntityPdf::dispatchSync($this);
|
(new CreateEntityPdf($this))->handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $storage_path;
|
return $storage_path;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user