Skip to content

Commit

Permalink
[Azure Functions] [Queue extension] Fix queue length (#44329)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrod authored Jun 3, 2024
1 parent 790d2fa commit 408672f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public async Task<int> GetQueueLengthAsync()
{
try
{
QueueProperties queueProperties = await _queue.GetPropertiesAsync().ConfigureAwait(false);
return queueProperties.ApproximateMessagesCount;
QueueTriggerMetrics queueMetrics = await GetMetricsAsync().ConfigureAwait(false);
return queueMetrics.QueueLength;
}
catch (RequestFailedException ex)
{
Expand Down

0 comments on commit 408672f

Please sign in to comment.