public HomeController(IHealthCheckUtility healthCheckUtility, IInfrastructureLogService infrastructureLogService, IConfigurationService configurationService)
 {
     _healthCheckUtility       = healthCheckUtility;
     _infrastructureLogService = infrastructureLogService;
     _configurationService     = configurationService;
     _releaseName = _configurationService.ConfigurationSettings.ReleaseName;
 }
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IConfigurationService configurationService, IHealthCheckUtility healthCheckUtility)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseAuthentication();
            app.UseMvc();
            app.UseStaticFiles();
            app.UseHangfireServer();

            app.UseHangfireDashboard("/hangfire", new DashboardOptions
            {
                AppPath       = "/CorrespondentPortal",
                Authorization = new[] { new HangfireDashboardAuthorizationFilter(configurationService.ConfigurationSettings.AdminAllAccessGroups) }
            });

            //Recurring Jobs
            var cronExpression = configurationService.ConfigurationSettings.HealthCheckNotificationCheckInterval;

            RecurringJob.AddOrUpdate("Check Health Status", () => healthCheckUtility.CheckHealthStatusAndNotifyAsync(), cronExpression);

            app.UseSwagger();
            app.UseSwaggerUI(config =>
            {
                config.SwaggerEndpoint("/CorrespondentPortal/swagger/v1/swagger.json",
                                       "CoreLogic CorrespondentPortal API v1");
            });
        }
Beispiel #3
0
 public HealthCheckController(IHealthCheckUtility healthCheckUtility)
 {
     _healthCheckUtility = healthCheckUtility;
 }