mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Remove dispatchSync
This commit is contained in:
parent
ad7889b769
commit
1e3b1c08da
@ -131,9 +131,9 @@ class CreateAccount extends Command
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
CreateCompanyPaymentTerms::dispatchSync($company, $user);
|
||||
CreateCompanyTaskStatuses::dispatchSync($company, $user);
|
||||
VersionCheck::dispatchSync();
|
||||
(new CreateCompanyPaymentTerms($company, $user))->handle();
|
||||
(new CreateCompanyTaskStatuses($company, $user))->handle();
|
||||
(new VersionCheck())->handle();
|
||||
}
|
||||
|
||||
private function warmCache()
|
||||
|
@ -112,9 +112,9 @@ class DemoMode extends Command
|
||||
$this->info('Seeding Random Data');
|
||||
$this->createSmallAccount();
|
||||
|
||||
VersionCheck::dispatchSync();
|
||||
(new VersionCheck())->handle();
|
||||
|
||||
CompanySizeCheck::dispatchSync();
|
||||
(new CompanySizeCheck())->handle();
|
||||
}
|
||||
|
||||
private function createSmallAccount()
|
||||
@ -164,8 +164,8 @@ class DemoMode extends Command
|
||||
]);
|
||||
}
|
||||
|
||||
CreateCompanyPaymentTerms::dispatchSync($company, $user);
|
||||
CreateCompanyTaskStatuses::dispatchSync($company, $user);
|
||||
(new CreateCompanyPaymentTerms($company, $user))->handle();
|
||||
(new CreateCompanyTaskStatuses($company, $user))->handle();
|
||||
|
||||
$company_token = new CompanyToken;
|
||||
$company_token->user_id = $user->id;
|
||||
|
@ -43,13 +43,13 @@ class HostedUsers extends Command
|
||||
{
|
||||
Company::on('db-ninja-01')->each(function ($company) {
|
||||
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) {
|
||||
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->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);
|
||||
|
||||
$this->credits->each(function ($credit) {
|
||||
CreateEntityPdf::dispatchSync($credit->invitations()->first());
|
||||
(new CreateEntityPdf($credit->invitations()->first()))->handle();
|
||||
});
|
||||
|
||||
try {
|
||||
|
@ -142,7 +142,7 @@ class TemplateEmail extends Mailable
|
||||
sleep(2);
|
||||
|
||||
if(!Storage::disk(config('filesystems.default'))->exists($path)) {
|
||||
CreateEntityPdf::dispatchSync($this->invitation);
|
||||
(new CreateEntityPdf($this->invitation))->handle();
|
||||
sleep(2);
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ class InvoiceInvitation extends BaseModel
|
||||
|
||||
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)));
|
||||
CreateEntityPdf::dispatchSync($this);
|
||||
(new CreateEntityPdf($this))->handle();
|
||||
}
|
||||
|
||||
return $storage_path;
|
||||
|
Loading…
x
Reference in New Issue
Block a user