Skip to content

Commit

Permalink
Merge pull request #89 from dotnetcameroon/fix/use-in-memory-hangfire
Browse files Browse the repository at this point in the history
fix: use in-memory hangfire
  • Loading branch information
djoufson authored Dec 29, 2024
2 parents 377b039 + c766f7f commit 2374dd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Extensions/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using app.shared.Utilities;
using EntityFrameworkCore.Seeder.Extensions;
using Hangfire;
using Hangfire.Storage.SQLite;
using Hangfire.MemoryStorage;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
Expand All @@ -38,7 +38,7 @@ public static IServiceCollection AddServices(
services.AddHangfire(cfg => cfg
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseSQLiteStorage(configuration.GetConnectionString(HangfireSqlite)));
.UseMemoryStorage());

// We currently use the memory cache because it's enough for our simple application
// We will scale to a distributed Redis Cache if needed
Expand Down
4 changes: 2 additions & 2 deletions app/app.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hangfire.MemoryStorage" Version="1.8.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
<PackageReference Include="Hangfire" Version="1.8.15" />
<PackageReference Include="Hangfire.Storage.SQLite" Version="0.4.2" />
<PackageReference Include="Hangfire" Version="1.8.17" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2374dd7

Please sign in to comment.