This commit is contained in:
User
2025-01-21 19:57:07 -05:00
parent befc90dd02
commit d9f57e4e86
17 changed files with 206 additions and 230 deletions

View File

@@ -6,11 +6,10 @@ use App\Models\Image;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Support\Facades\Log;
use romanzipp\QueueMonitor\Traits\IsMonitored;
class ImageUpsert implements ShouldQueue
{
use IsMonitored, Queueable;
use Queueable;
/**
* Create a new job instance.
@@ -26,12 +25,7 @@ class ImageUpsert implements ShouldQueue
*/
public function handle(): void
{
$this->queueProgress(0);
Log::info("JOB ImageUpsert START, comicId: {$this->comicId}, chapterId: {$this->chapterId}");
$this->queueData([
'comicId' => $this->comicId,
'chapterId' => $this->chapterId,
]);
$arrayForUpsert = [];
@@ -53,6 +47,5 @@ class ImageUpsert implements ShouldQueue
Image::upsert($arrayForUpsert, uniqueBy: 'url');
Log::info('JOB ImageUpsert END');
$this->queueProgress(100);
}
}