Skip to content

Commit 7781b76

Browse files
committed
Remove GetPage
1 parent c545d86 commit 7781b76

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/ServiceControl.Transports.RabbitMQ/RabbitMQQuery.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public override async IAsyncEnumerable<IBrokerQueue> GetQueueNames([EnumeratorCa
8686

8787
do
8888
{
89-
(var queues, morePages) = await GetPage(page, cancellationToken);
89+
(var statusCode, var reason, var queues, morePages) = await pipeline.ExecuteAsync(async token => await managementClient.Value.GetQueues(page, 500, token), cancellationToken);
90+
91+
ValidateResponse((statusCode, reason, queues));
9092

9193
if (queues is not null)
9294
{
@@ -124,15 +126,6 @@ async Task GetRabbitDetails(CancellationToken cancellationToken)
124126
Data["RabbitMQVersion"] = response.Value?.BrokerVersion ?? "Unknown";
125127
}
126128

127-
async Task<(List<Queue>?, bool morePages)> GetPage(int page, CancellationToken cancellationToken)
128-
{
129-
var (statusCode, reason, value, morePages) = await pipeline.ExecuteAsync(async token => await managementClient.Value.GetQueues(page, 500, token), cancellationToken);
130-
131-
ValidateResponse((statusCode, reason, value));
132-
133-
return (value, morePages);
134-
}
135-
136129
async Task AddAdditionalQueueDetails(RabbitMQBrokerQueueDetails brokerQueue, CancellationToken cancellationToken)
137130
{
138131
try

0 commit comments

Comments
 (0)