mirror of
https://github.com/bitwarden/server.git
synced 2025-12-10 00:42:07 -06:00
Add configurable queue name support to AzureQueueHostedService
This commit is contained in:
parent
6d5d7e58a6
commit
44decfdc25
@ -57,14 +57,16 @@ public class AzureQueueHostedService : IHostedService, IDisposable
|
||||
private async Task ExecuteAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var storageConnectionString = _configuration["azureStorageConnectionString"];
|
||||
if (string.IsNullOrWhiteSpace(storageConnectionString))
|
||||
var queueName = _configuration["azureQueueServiceQueueName"];
|
||||
if (string.IsNullOrWhiteSpace(storageConnectionString) ||
|
||||
string.IsNullOrWhiteSpace(queueName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var repo = new Core.Repositories.TableStorage.EventRepository(storageConnectionString);
|
||||
_eventWriteService = new RepositoryEventWriteService(repo);
|
||||
_queueClient = new QueueClient(storageConnectionString, "event");
|
||||
_queueClient = new QueueClient(storageConnectionString, queueName);
|
||||
|
||||
while (!cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user