mirror of
https://github.com/bitwarden/server
synced 2026-01-05 10:03:23 +00:00
Refactor configuration for azure queue service for events to include queue name (#6724)
* Refactor configuration for azure queue service for events to include queue name * Address PR feedback * Add check for queue name before writing to Azure Queue Service * Fix file encoding (lint error)
This commit is contained in:
@@ -91,7 +91,8 @@ public static class EventIntegrationsServiceCollectionExtensions
|
||||
return services;
|
||||
}
|
||||
|
||||
if (CoreHelpers.SettingHasValue(globalSettings.Events.ConnectionString))
|
||||
if (CoreHelpers.SettingHasValue(globalSettings.Events.ConnectionString) &&
|
||||
CoreHelpers.SettingHasValue(globalSettings.Events.QueueName))
|
||||
{
|
||||
services.TryAddSingleton<IEventWriteService, AzureQueueEventWriteService>();
|
||||
return services;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Bit.Core.Services;
|
||||
public class AzureQueueEventWriteService : AzureQueueService<IEvent>, IEventWriteService
|
||||
{
|
||||
public AzureQueueEventWriteService(GlobalSettings globalSettings) : base(
|
||||
new QueueClient(globalSettings.Events.ConnectionString, "event"),
|
||||
new QueueClient(globalSettings.Events.ConnectionString, globalSettings.Events.QueueName),
|
||||
JsonHelpers.IgnoreWritingNull)
|
||||
{ }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user