From 1c9b6b3068c64f50ae99a96ca662206c6078a1c5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 14 Jul 2023 09:18:51 -0500 Subject: [PATCH] put environment at end to be safe --- src/Repositories/RedisMasterSupervisorRepository.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Repositories/RedisMasterSupervisorRepository.php b/src/Repositories/RedisMasterSupervisorRepository.php index 6bfed64c..2f3de0f2 100644 --- a/src/Repositories/RedisMasterSupervisorRepository.php +++ b/src/Repositories/RedisMasterSupervisorRepository.php @@ -72,7 +72,7 @@ public function get(array $names) { $records = $this->connection()->pipeline(function ($pipe) use ($names) { foreach ($names as $name) { - $pipe->hmget('master:'.$name, ['name', 'environment', 'pid', 'status', 'supervisors']); + $pipe->hmget('master:'.$name, ['name', 'pid', 'status', 'supervisors', 'environment']); } }); @@ -81,10 +81,10 @@ public function get(array $names) return ! $record[0] ? null : (object) [ 'name' => $record[0], - 'environment' => $record[1], - 'pid' => $record[2], - 'status' => $record[3], - 'supervisors' => json_decode($record[4], true), + 'environment' => $record[4], + 'pid' => $record[1], + 'status' => $record[2], + 'supervisors' => json_decode($record[3], true), ]; })->filter()->all(); }