Skip to content

Commit

Permalink
Do not limit the maximum execution time if the queue connection is "s…
Browse files Browse the repository at this point in the history
…ync" (#3618)

* When regenerating the conversions, do not limit the maximum execution time if the queue connection is "sync".

* Strict checking queue connection
  • Loading branch information
VGirol authored May 23, 2024
1 parent b980530 commit 37ecca8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Conversions/Commands/RegenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function handle(MediaRepository $mediaRepository, FileManipulator $fileMa

$progressBar = $this->output->createProgressBar($mediaFiles->count());

if (config('media-library.queue_connection_name') === 'sync') {
set_time_limit(0);
}

$mediaFiles->each(function (Media $media) use ($progressBar) {
try {
$this->fileManipulator->createDerivedFiles(
Expand Down

0 comments on commit 37ecca8

Please sign in to comment.