public AwwAppLogic(IAwwAppLinkDal awwAppLinkDal) { _awwAppLinkDal = awwAppLinkDal; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IAwwAppLogic logic, IAwwAppLinkDal dal, IBackgroundJobClient backgroundJobs) { dal.Clean(); backgroundJobs.Schedule(() => logic.CacheLinks(10), TimeSpan.FromSeconds(30)); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHangfireServer(); app.UseHangfireDashboard("/hangfire", new DashboardOptions { DashboardTitle = "Hangfire Jobs", Authorization = new[] { new HangfireAuthorizationFilter("admin") } }); app.UseStaticFiles(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }