0.1.4
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user