[#8] some fixes on movie processing
This commit is contained in:
@@ -47,7 +47,15 @@ class FetchItemDataCommand extends Command
|
||||
{
|
||||
return ItemToFetch::has('jobs')
|
||||
->with([
|
||||
'jobs' => fn ($jobs) => array_search($job, $jobs->first()->remaining_jobs, true),
|
||||
// 'jobs' => fn ($jobs) => dd($jobs->first()->remaining_jobs) /*array_search($job, $jobs->first()->remaining_jobs, true)*/,
|
||||
'jobs' => function ($jobs) use ($job) {
|
||||
$remainingJobs = $jobs->first()->remaining_jobs;
|
||||
if (is_string($remainingJobs)) {
|
||||
$remainingJobs = json_decode($jobs->first()->remaining_jobs, true);
|
||||
}
|
||||
return array_search($job, $remainingJobs, true);
|
||||
},
|
||||
|
||||
])
|
||||
->where('type', $type)
|
||||
->take($batch)
|
||||
|
||||
Reference in New Issue
Block a user