diff --git a/app/Jobs/ProcessModPackFile.php b/app/Jobs/ProcessModPackFile.php index 6411e94d..908a4ba9 100644 --- a/app/Jobs/ProcessModPackFile.php +++ b/app/Jobs/ProcessModPackFile.php @@ -9,6 +9,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\Middleware\WithoutOverlapping; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; @@ -36,6 +37,16 @@ public function __construct(Modpack $modpack, string $filePath) $this->filePath = $filePath; } + /** + * Get the middleware the job should pass through. + * + * @return array + */ + public function middleware() + { + return [new WithoutOverlapping($this->modpack->id)]; + } + /** * Execute the job. *