mirror of
https://github.com/bitwarden/server.git
synced 2024-12-23 17:07:42 +01:00
noop event write service
This commit is contained in:
parent
c445ce3c49
commit
8ac284f1ec
@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.WindowsAzure.Storage.Table;
|
||||
|
||||
namespace Bit.Core.Services
|
||||
{
|
||||
public class NoopEventWriteService : IEventWriteService
|
||||
{
|
||||
public Task CreateAsync(ITableEntity entity)
|
||||
{
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
public Task CreateManyAsync(IList<ITableEntity> entities)
|
||||
{
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
}
|
||||
}
|
@ -105,14 +105,16 @@ namespace Bit.Core.Utilities
|
||||
if(!globalSettings.SelfHosted && CoreHelpers.SettingHasValue(globalSettings.Storage.ConnectionString))
|
||||
{
|
||||
services.AddSingleton<IBlockIpService, AzureQueueBlockIpService>();
|
||||
services.AddSingleton<IEventWriteService, AzureQueueEventWriteService>();
|
||||
//services.AddSingleton<IEventWriteService, AzureQueueEventWriteService>();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddSingleton<IBlockIpService, NoopBlockIpService>();
|
||||
services.AddSingleton<IEventWriteService, RepositoryEventWriteService>();
|
||||
//services.AddSingleton<IEventWriteService, RepositoryEventWriteService>();
|
||||
}
|
||||
|
||||
services.AddSingleton<IEventWriteService, NoopEventWriteService>();
|
||||
|
||||
if(CoreHelpers.SettingHasValue(globalSettings.Attachment.ConnectionString))
|
||||
{
|
||||
services.AddSingleton<IAttachmentStorageService, AzureAttachmentStorageService>();
|
||||
@ -136,6 +138,7 @@ namespace Bit.Core.Utilities
|
||||
services.AddSingleton<IPushRegistrationService, NoopPushRegistrationService>();
|
||||
services.AddSingleton<IAttachmentStorageService, NoopAttachmentStorageService>();
|
||||
services.AddSingleton<ILicensingService, NoopLicensingService>();
|
||||
services.AddSingleton<IEventWriteService, NoopEventWriteService>();
|
||||
}
|
||||
|
||||
public static IdentityBuilder AddCustomIdentityServices(
|
||||
|
Loading…
Reference in New Issue
Block a user