1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-19 12:08:11 -05:00

some logging from queue service

This commit is contained in:
Kyle Spearrin 2018-08-24 11:23:39 -04:00
parent 53caacb870
commit 263dfda9c4

View File

@ -60,6 +60,9 @@ namespace Bit.Notifications
var queueClient = storageAccount.CreateCloudQueueClient(); var queueClient = storageAccount.CreateCloudQueueClient();
_queue = queueClient.GetQueueReference("notifications"); _queue = queueClient.GetQueueReference("notifications");
_logger.LogInformation("starting queue read");
try
{
while(!cancellationToken.IsCancellationRequested) while(!cancellationToken.IsCancellationRequested)
{ {
var messages = await _queue.GetMessagesAsync(32, TimeSpan.FromMinutes(1), var messages = await _queue.GetMessagesAsync(32, TimeSpan.FromMinutes(1),
@ -82,5 +85,10 @@ namespace Bit.Notifications
} }
} }
} }
catch(Exception e)
{
_logger.LogError(e, "error from queue");
}
}
} }
} }