From a9b35220819aef0f4ea6c53152c21af150379474 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 31 Jul 2022 21:51:35 +1000 Subject: [PATCH] Fixes for using dispatchSync() --- app/Jobs/Mail/NinjaMailerJob.php | 4 ++-- app/Jobs/Util/StartMigration.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index e3e3d47f12..2d87ba119d 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -229,7 +229,7 @@ class NinjaMailerJob implements ShouldQueue ->mailable ->from($user->email, $user->name()) ->withSymfonyMessage(function ($message) use($token) { - $message->getHeaders()->addTextHeader('GmailToken', $token); + $message->getHeaders()->addTextHeader('gmailtoken', $token); }); sleep(rand(1,3)); @@ -299,7 +299,7 @@ class NinjaMailerJob implements ShouldQueue ->mailable ->from($user->email, $user->name()) ->withSymfonyMessage(function ($message) use($token) { - $message->getHeaders()->addTextHeader('GmailToken', $token); + $message->getHeaders()->addTextHeader('gmailtoken', $token); }); } diff --git a/app/Jobs/Util/StartMigration.php b/app/Jobs/Util/StartMigration.php index 27ad98cdaa..6592f3cf99 100644 --- a/app/Jobs/Util/StartMigration.php +++ b/app/Jobs/Util/StartMigration.php @@ -116,7 +116,7 @@ class StartMigration implements ShouldQueue throw new NonExistingMigrationFile('Migration file does not exist, or it is corrupted.'); } - Import::dispatchSync($file, $this->company, $this->user); + (new Import($file, $this->company, $this->user))->handle(); Storage::deleteDirectory(public_path("storage/migrations/{$filename}"));