private void SetupEnvironment(IVostokHostingEnvironmentBuilder builder) { builder.SetupShutdownToken(ShutdownTokenSource.Token); builder.SetupShutdownTimeout(settings.ShutdownTimeout); RequirementsHelper.EnsurePort(settings.Application, builder); RequirementsHelper.EnsureConfigurations(settings.Application, builder); settings.EnvironmentSetup(builder); }
private void SetupCommons(IVostokHostingEnvironmentBuilder builder) { builder.SetupApplicationIdentity( id => { id.SetProject("Project"); id.SetApplication("App"); id.SetEnvironment("Environment"); id.SetInstance("Instance"); }); builder.SetupShutdownToken(shutdown.Token); builder.SetupShutdownTimeout(30.Seconds() + ShutdownConstants.CutAmountForExternalTimeout); builder.SetupLog(log => log.SetupConsoleLog()); }
private void SetupEnvironment(IVostokHostingEnvironmentBuilder builder) { builder.SetupShutdownToken(ShutdownTokenSource.Token); builder.SetupShutdownTimeout(settings.ShutdownTimeout); builder.SetupHostExtensions( extensions => { var vostokHostShutdown = new VostokHostShutdown(ShutdownTokenSource); extensions.Add(vostokHostShutdown); extensions.Add(typeof(IVostokHostShutdown), vostokHostShutdown); }); RequirementsHelper.EnsurePort(settings.Application, builder); RequirementsHelper.EnsureConfigurations(settings.Application, builder); settings.EnvironmentSetup(builder); }