0.1.4
This commit is contained in:
@@ -6,11 +6,10 @@ use App\Remote\CopyManga;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use romanzipp\QueueMonitor\Traits\IsMonitored;
|
||||
|
||||
class RemotePrefetch implements ShouldQueue
|
||||
{
|
||||
use IsMonitored, Queueable;
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
@@ -25,17 +24,11 @@ class RemotePrefetch implements ShouldQueue
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
$this->queueProgress(0);
|
||||
$copyManga = new CopyManga();
|
||||
|
||||
switch ($this->action) {
|
||||
case 'chapter':
|
||||
Log::info("JOB RemotePrefetch START, action '{$this->action}', Pathword: {$this->parameters['pathword']}, UUID: {$this->parameters['uuid']}");
|
||||
$this->queueData([
|
||||
'action' => $this->action,
|
||||
'pathword' => $this->parameters['pathword'],
|
||||
'uuid' => $this->parameters['uuid']
|
||||
]);
|
||||
|
||||
$copyManga->chapter($this->parameters['pathword'], $this->parameters['uuid']);
|
||||
|
||||
@@ -46,13 +39,6 @@ class RemotePrefetch implements ShouldQueue
|
||||
break;
|
||||
case 'comics':
|
||||
Log::info("JOB RemotePrefetch START, action '{$this->action}', Offset: {$this->parameters['offset']}");
|
||||
$this->queueData([
|
||||
'action' => $this->action,
|
||||
'offset' => $this->parameters['offset'],
|
||||
'limit' => $this->parameters['limit'],
|
||||
'top' => $this->parameters['top'],
|
||||
'params' => $this->parameters['params']
|
||||
]);
|
||||
|
||||
$copyManga->comics($this->parameters['offset'], $this->parameters['limit'], $this->parameters['top'], $this->parameters['params']);
|
||||
|
||||
@@ -62,7 +48,5 @@ class RemotePrefetch implements ShouldQueue
|
||||
Log::info("JOB RemotePrefetch Unknown action '{$this->action}'");
|
||||
break;
|
||||
}
|
||||
|
||||
$this->queueProgress(100);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user