aboutsummaryrefslogtreecommitdiff
path: root/Main/Startup.cs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-18 19:53:34 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-18 19:53:34 +0000
commit531112dac0bee796316bc058d74bdbb060b968e5 (patch)
treeda27977556794cb4076266a4da35a540a906ba5f /Main/Startup.cs
parent3260a181a1d5b282e8fbab20fb511cddf30a3b5e (diff)
downloadnewsaggregator-531112dac0bee796316bc058d74bdbb060b968e5.tar.gz
newsaggregator-531112dac0bee796316bc058d74bdbb060b968e5.tar.bz2
newsaggregator-531112dac0bee796316bc058d74bdbb060b968e5.zip
Using temporary in memory storage solution for Hangfire - will move to something like MongoDB
Diffstat (limited to 'Main/Startup.cs')
-rw-r--r--Main/Startup.cs9
1 files changed, 8 insertions, 1 deletions
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<DatabaseContext>(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();
}
}
}