Skip to content

Commit

Permalink
put environment at end to be safe
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 14, 2023
1 parent ab618d1 commit 1c9b6b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Repositories/RedisMasterSupervisorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
});

Expand All @@ -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();
}
Expand Down

0 comments on commit 1c9b6b3

Please sign in to comment.