From c36d83e8b6b06429bbd747c0bf3e2166481614c4 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Sat, 1 Nov 2025 16:48:17 +0100 Subject: [PATCH] Reverted concurrent popup lookup --- .../Jobs/Instagram/InstagramAbstractJob.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/app/Browser/Jobs/Instagram/InstagramAbstractJob.php b/app/Browser/Jobs/Instagram/InstagramAbstractJob.php index f33ee92..f703e2e 100644 --- a/app/Browser/Jobs/Instagram/InstagramAbstractJob.php +++ b/app/Browser/Jobs/Instagram/InstagramAbstractJob.php @@ -10,7 +10,6 @@ use App\Notification\Providers\AllNotification; use Facebook\WebDriver\WebDriverBy; use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing; use Illuminate\Support\Collection; -use Illuminate\Support\Facades\Concurrency; use Illuminate\Support\Facades\Log; use Laravel\Dusk\Browser; use App\Services\AIPrompt\OpenAPIPrompt; @@ -108,22 +107,9 @@ abstract class InstagramAbstractJob extends BrowserJob implements ShouldBeUnique ['//button|//div[contains(text(), "OK")]', ["Popup Ok clicked"]], // OK ]; - $fn = []; foreach ($popupsTypes as $popup) { - $fn[] = function () use ($browser, $popup) { - try { - return $browser->driver->findElement(WebDriverBy::xpath($popup[0])); - } catch (\Exception $e) { - return null; - } - }; - } - - $buttons = Concurrency::run($fn); - - foreach ($popupsTypes as $index => $popup) { try { - $button = $buttons[$index] ?? null; + $button = $browser->driver->findElement(WebDriverBy::xpath($popup[0])); if ($button === null) { continue; // No button found, continue to the next popup }