From 531112dac0bee796316bc058d74bdbb060b968e5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 18 Feb 2019 19:53:34 +0000 Subject: Using temporary in memory storage solution for Hangfire - will move to something like MongoDB --- Main/Main.csproj | 2 +- Main/Startup.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'Main') diff --git a/Main/Main.csproj b/Main/Main.csproj index d0acd53..50d274a 100644 --- a/Main/Main.csproj +++ b/Main/Main.csproj @@ -6,7 +6,7 @@ - + diff --git a/Main/Startup.cs b/Main/Startup.cs index 7f615fd..c1e4a10 100644 --- a/Main/Startup.cs +++ b/Main/Startup.cs @@ -9,6 +9,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; +using Hangfire; +using Hangfire.MemoryStorage; using Classes; using Database; @@ -29,8 +31,10 @@ namespace Server { }); services.AddDbContext(options => { - options.UseMySQL(Configuration.GetConnectionString("connectionString")); + options.UseMySQL(Configuration.GetConnectionString("Aggregator")); }); + + services.AddHangfire(options => options.UseMemoryStorage()); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { @@ -49,6 +53,9 @@ namespace Server { "Website" ) ); + + app.UseHangfireDashboard(); + app.UseHangfireServer(); } } } -- cgit v1.2.3-13-gbd6f