Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Removed LiteDB and use In Memory Storage for time being. LiteDB was causing the issues in Issue #79.

Joseph Milazzo546f12c79560
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 @@
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.0" />
<PackageReference Include="Hangfire" Version="1.7.18" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.18" />
- <PackageReference Include="Hangfire.LiteDB" Version="0.4.0" />
<PackageReference Include="Hangfire.MaximumConcurrentExecutions" Version="1.1.0" />
<PackageReference Include="Hangfire.MemoryStorage.Core" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.1" NoWarn="NU1605" />
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();
});