Skip to content

Commit

Permalink
Merge pull request #23 from aloware/update-stats
Browse files Browse the repository at this point in the history
Queues sorted by partitions ASC
  • Loading branch information
hamed-aloware authored Jun 22, 2022
2 parents 6ae0a3b + 1a85f41 commit fe3b464
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/js/screens/queues/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
<th>Queue</th>
<th>Partitions</th>
<th>Jobs</th>
<th>Processed 1 Minute</th>
<th>Processed 20 Minute</th>
<th>Processed In 1 Minute</th>
<th>Processed In 20 Minutes</th>
<th></th>
</tr>
</thead>
Expand Down
4 changes: 4 additions & 0 deletions src/Repositories/RedisRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ private function queuesWithPartitionsPrivate(
];
}

usort($queues, function ($a, $b) {
return ($b['partitions_count'] < $a['partitions_count']) ? 1 : -1;
});

return $queues;
}

Expand Down

0 comments on commit fe3b464

Please sign in to comment.