From 546f12c7956037ef6647215276b59868e68f7432 Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Thu, 18 Mar 2021 08:54:30 -0500 Subject: [PATCH] Removed LiteDB and use In Memory Storage for time being. LiteDB was causing the issues in Issue #79. --- API/API.csproj | 1 - API/Startup.cs | 21 +++++---------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/API/API.csproj b/API/API.csproj index 0f6d90fb6..51bb3becf 100644 --- a/API/API.csproj +++ b/API/API.csproj @@ -14,7 +14,6 @@ - diff --git a/API/Startup.cs b/API/Startup.cs index c9a6a8eca..997954016 100644 --- a/API/Startup.cs +++ b/API/Startup.cs @@ -6,7 +6,6 @@ using API.Interfaces.Services; using API.Middleware; using API.Services; using Hangfire; -using Hangfire.LiteDB; using Hangfire.MemoryStorage; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -65,20 +64,10 @@ namespace API services.AddResponseCaching(); - if (_env.IsDevelopment()) - { - services.AddHangfire(configuration => configuration - .UseSimpleAssemblyNameTypeSerializer() - .UseRecommendedSerializerSettings() - .UseMemoryStorage()); - } - else - { - services.AddHangfire(configuration => configuration - .UseSimpleAssemblyNameTypeSerializer() - .UseRecommendedSerializerSettings() - .UseLiteDbStorage()); - } + services.AddHangfire(configuration => configuration + .UseSimpleAssemblyNameTypeSerializer() + .UseRecommendedSerializerSettings() + .UseMemoryStorage()); // Add the processing server as IHostedService services.AddHangfireServer(); @@ -132,7 +121,7 @@ namespace API MaxAge = TimeSpan.FromSeconds(10) }; context.Response.Headers[Microsoft.Net.Http.Headers.HeaderNames.Vary] = - new string[] { "Accept-Encoding" }; + new[] { "Accept-Encoding" }; await next(); });