chore: update CI to v4.6.3 + all php and js dependencies

This commit is contained in:
Yassine Doghri 2025-08-25 18:09:41 +00:00
commit 346c00e7b5
206 changed files with 6239 additions and 5336 deletions

View file

@ -25,13 +25,15 @@ class Generate extends BaseCommand
{
// get number of running clips to prevent from having too much running in parallel
// TODO: get the number of running ffmpeg processes directly from the machine?
$runningVideoClips = (new ClipModel())->getRunningVideoClipsCount();
$runningVideoClips = new ClipModel()
->getRunningVideoClipsCount();
if ($runningVideoClips >= config('Admin')->videoClipWorkers) {
return;
}
// get all clips that haven't been processed yet
$scheduledClips = (new ClipModel())->getScheduledVideoClips();
$scheduledClips = new ClipModel()
->getScheduledVideoClips();
if ($scheduledClips === []) {
return;
@ -45,13 +47,14 @@ class Generate extends BaseCommand
];
}
(new ClipModel())->updateBatch($data, 'id');
new ClipModel()
->updateBatch($data, 'id');
// Loop through clips to generate them
foreach ($scheduledClips as $scheduledClip) {
try {
// set clip to pending
(new ClipModel())
new ClipModel()
->update($scheduledClip->id, [
'status' => 'running',
'job_started_at' => Time::now(),
@ -86,11 +89,12 @@ class Generate extends BaseCommand
$clipModel->clearVideoClipCache($scheduledClip->id);
} catch (Exception $exception) {
(new ClipModel())->update($scheduledClip->id, [
'status' => 'failed',
'logs' => $exception,
'job_ended_at' => Time::now(),
]);
new ClipModel()
->update($scheduledClip->id, [
'status' => 'failed',
'logs' => $exception,
'job_ended_at' => Time::now(),
]);
}
}
}