| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Jobs\Import;
- use App\Events\SendWebSocketMessageEvent;
- use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Queue\Queueable;
- use Illuminate\Support\Facades\Log;
- class ImportCatalog implements ShouldQueue, ShouldBeUniqueUntilProcessing
- {
- use Queueable;
- /**
- * Create a new job instance.
- */
- public function __construct(private readonly int $year, private readonly string $path)
- {
- //
- }
- /**
- * Execute the job.
- */
- public function handle(): void
- {
- Log::info('ImportCatalog job done!');
- // make event
- event(new SendWebSocketMessageEvent('TEsttttd', 1));
- }
- }
|