diff --git a/app/Events/Product/ProductWasRestored.php b/app/Events/Product/ProductWasRestored.php index 558b17ebfd6a..9d7ec6c7d3fb 100644 --- a/app/Events/Product/ProductWasRestored.php +++ b/app/Events/Product/ProductWasRestored.php @@ -12,6 +12,7 @@ namespace App\Events\Product; use App\Models\Company; +use App\Models\Product; use Illuminate\Queue\SerializesModels; /** diff --git a/app/Http/Controllers/MigrationController.php b/app/Http/Controllers/MigrationController.php index 8506f5159feb..afe76b9c1c80 100644 --- a/app/Http/Controllers/MigrationController.php +++ b/app/Http/Controllers/MigrationController.php @@ -349,7 +349,7 @@ class MigrationController extends BaseController // StartMigration::dispatch(base_path("storage/app/public/$migration_file"), $user, $fresh_company)->delay(now()->addSeconds(5)); nlog("starting migration job"); nlog($migration_file); - StartMigration::dispatch($migration_file, $user, $fresh_company); + StartMigration::dispatch($migration_file, $user, $fresh_company)->onQueue('migration'); // } catch (\Exception $e) { // nlog($e->getMessage()); // } diff --git a/app/Jobs/Util/StartMigration.php b/app/Jobs/Util/StartMigration.php index e26c7462ed74..8b5f09fcfbc6 100644 --- a/app/Jobs/Util/StartMigration.php +++ b/app/Jobs/Util/StartMigration.php @@ -109,7 +109,7 @@ class StartMigration implements ShouldQueue throw new NonExistingMigrationFile('Migration file does not exist, or it is corrupted.'); } - Import::dispatchNow($file, $this->company, $this->user); + Import::dispatchNow($file, $this->company, $this->user)->onQueue('migration'); Storage::deleteDirectory(public_path("storage/migrations/{$filename}"));