From bb93c05ec0eac8d8b09986504ad41ef1ea1268b5 Mon Sep 17 00:00:00 2001 From: PMahhov Date: Wed, 9 Jul 2025 13:47:39 +0200 Subject: [PATCH] put the sleep timer outside the function --- dist/app/Console/Commands/ProcessMatchmaking.php | 2 ++ dist/app/Models/Game/Matchmaking/MatchConfiguration.php | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dist/app/Console/Commands/ProcessMatchmaking.php b/dist/app/Console/Commands/ProcessMatchmaking.php index e0f335c..474b42c 100644 --- a/dist/app/Console/Commands/ProcessMatchmaking.php +++ b/dist/app/Console/Commands/ProcessMatchmaking.php @@ -78,6 +78,8 @@ public function handle(): void )); $playerCount = $this->getTotalPlayersCount($players); + if ($playerCount->hunters === 1 && ($playerCount->runners === 4 || $playerCount->runners === 5)) + sleep(10); $availableMatchConfigs = MatchConfiguration::getAvailableMatchConfigs($playerCount->runners, $playerCount->hunters); if($availableMatchConfigs->isEmpty()) diff --git a/dist/app/Models/Game/Matchmaking/MatchConfiguration.php b/dist/app/Models/Game/Matchmaking/MatchConfiguration.php index 10b14ed..b836d8f 100644 --- a/dist/app/Models/Game/Matchmaking/MatchConfiguration.php +++ b/dist/app/Models/Game/Matchmaking/MatchConfiguration.php @@ -38,9 +38,6 @@ class MatchConfiguration extends Model */ public static function getAvailableMatchConfigs(int $runnerCount, int $hunterCount): Collection { - if ($hunterCount === 1 && ($runnerCount === 4 || $runnerCount === 5)) - sleep(10); - return MatchConfiguration::where('runners', '<=', $runnerCount) ->where('hunters', '<=', $hunterCount) ->where('enabled', '=', true)