put the sleep timer outside the function

This commit is contained in:
PMahhov 2025-07-09 13:47:39 +02:00
parent 199863e507
commit bb93c05ec0
2 changed files with 2 additions and 3 deletions

View File

@ -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())

View File

@ -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)