From fe601d4cfb6257d40d14d55ea6eb7830f6e84558 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 21 Feb 2019 13:55:51 +0000 Subject: Changed hangfire configuration to use mysql storage --- Main/Startup.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Main/Startup.cs b/Main/Startup.cs index c1e4a10..b98b596 100644 --- a/Main/Startup.cs +++ b/Main/Startup.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; using Hangfire; +using Hangfire.MySql.Core; using Hangfire.MemoryStorage; using Classes; @@ -31,10 +32,10 @@ namespace Server { }); services.AddDbContext(options => { - options.UseMySQL(Configuration.GetConnectionString("Aggregator")); + options.UseMySQL(Configuration.GetConnectionString("Storage")); }); - services.AddHangfire(options => options.UseMemoryStorage()); + services.AddHangfire(options => options.UseStorage(new MySqlStorage(Configuration.GetConnectionString("Storage")))); } public void Configure(IApplicationBuilder app, IHostingEnvironment env) { -- cgit v1.2.3-13-gbd6f