From bf0336c76e0147d824daefca2b2bcc49bf60e79a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 21 Feb 2019 18:23:50 +0000 Subject: Added job of aggregator --- Main/Startup.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Main') diff --git a/Main/Startup.cs b/Main/Startup.cs index e7d1161..2857e5b 100644 --- a/Main/Startup.cs +++ b/Main/Startup.cs @@ -10,7 +10,9 @@ using Microsoft.EntityFrameworkCore; using Hangfire; using Hangfire.MySql.Core; + using Database; +using Main.Jobs; namespace Main { public class Startup { @@ -48,6 +50,10 @@ namespace Main { app.UseHangfireDashboard(); app.UseHangfireServer(); + + var context = app.ApplicationServices.GetService(); + + RecurringJob.AddOrUpdate(() => AggregatorJob.Process(context), Cron.HourInterval(3)); // add database update as a job } } } -- cgit v1.2.3-13-gbd6f