0.1.3
This commit is contained in:
@@ -6,10 +6,11 @@ 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 Queueable;
|
||||
use IsMonitored, Queueable;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
@@ -25,7 +26,12 @@ 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 = [];
|
||||
|
||||
@@ -47,5 +53,6 @@ class ImageUpsert implements ShouldQueue
|
||||
Image::upsert($arrayForUpsert, uniqueBy: 'url');
|
||||
|
||||
Log::info('JOB ImageUpsert END');
|
||||
$this->queueProgress(100);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user