aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-21 13:55:51 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-21 13:55:51 +0000
commitfe601d4cfb6257d40d14d55ea6eb7830f6e84558 (patch)
treea1e85ca9d194ddaa8d5d0bb9b2d20d5828d0b377
parent72186eb96cf6a6a72abcd8236ff3756bd95f5458 (diff)
downloadnewsaggregator-fe601d4cfb6257d40d14d55ea6eb7830f6e84558.tar.gz
newsaggregator-fe601d4cfb6257d40d14d55ea6eb7830f6e84558.tar.bz2
newsaggregator-fe601d4cfb6257d40d14d55ea6eb7830f6e84558.zip
Changed hangfire configuration to use mysql storage
-rw-r--r--Main/Startup.cs5
1 files 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<DatabaseContext>(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) {