From 37ecca8a5166c9290388b681923bc336a378ca3d Mon Sep 17 00:00:00 2001 From: VGirol Date: Thu, 23 May 2024 10:10:59 +0200 Subject: [PATCH] Do not limit the maximum execution time if the queue connection is "sync" (#3618) * When regenerating the conversions, do not limit the maximum execution time if the queue connection is "sync". * Strict checking queue connection --- src/Conversions/Commands/RegenerateCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Conversions/Commands/RegenerateCommand.php b/src/Conversions/Commands/RegenerateCommand.php index 50f583019..34f8abaaf 100644 --- a/src/Conversions/Commands/RegenerateCommand.php +++ b/src/Conversions/Commands/RegenerateCommand.php @@ -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(