private void InitHangfire(IAppBuilder app) { var hangfireConfig = IoC.Container.Resolve<IHangfireConfig>(); GlobalConfiguration.Configuration.UseSqlServerStorage( hangfireConfig.SqlServerConnectionString, new SqlServerStorageOptions() { PrepareSchemaIfNecessary = true, QueuePollInterval = TimeSpan.FromSeconds(1) }); GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 3 }); app.UseHangfireDashboard("/hangfire", new DashboardOptions { AuthorizationFilters = new[] { new MyRestrictiveAuthorizationFilter() } }); LogProvider.SetCurrentLogProvider(new ElmahLogProvider(LogLevel.Trace)); var options = new BackgroundJobServerOptions { WorkerCount = Environment.ProcessorCount * 5 }; app.UseHangfireServer(options); }
public static void ConfigureHangfire(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard("/jobs"); app.UseHangfireServer(); }
public void ConfigureHangFire(IAppBuilder app) { var storageOptions = new SqlServerStorageOptions { InvisibilityTimeout = TimeSpan.FromHours(2), QueuePollInterval = TimeSpan.FromMinutes(15.0) }; GlobalConfiguration.Configuration .UseSqlServerStorage("TrainingManagerDb", storageOptions); // case msmq installed /*GlobalConfiguration.Configuration .UseSqlServerStorage("TrainingManagerDb") .UseMsmqQueues(@".\hangfire-{0}");*/ var dashboardOptions = new DashboardOptions { AuthorizationFilters = new[] { new AuthorizationFilter { Roles = AppConstants.UserRole.Administrator } } }; app.UseHangfireDashboard("/hangfire", dashboardOptions); var jobServerOptions = new BackgroundJobServerOptions { WorkerCount = 1 }; app.UseHangfireServer(jobServerOptions); RecurringJob.AddOrUpdate(() => UpdateDaemon.ScheduledCatalogsUpdate(), Cron.Hourly); }
public void Configuration(IAppBuilder app) { HangfireConfiguration.Register(); var options = new DashboardOptions { AuthorizationFilters = new [] { new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions { RequireSsl = true, LoginCaseSensitive = true, Users = new [] { new BasicAuthAuthorizationUser { Login = "******", PasswordClear = "D3v3L0pM3nT" } } }), } }; app.UseHangfireDashboard("/hangfire", options); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { var authorizationFilter = new BasicAuthAuthorizationFilter( new BasicAuthAuthorizationFilterOptions { // Require secure connection for dashboard RequireSsl = true, // Case sensitive login checking LoginCaseSensitive = true, // Users Users = new[] { new BasicAuthAuthorizationUser { Login = "******", PasswordClear = "passW0rd!" } } }); var options = new DashboardOptions { AuthorizationFilters = new IAuthorizationFilter[] { authorizationFilter } }; GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard("/hangfire", options); app.UseHangfireServer(); ConfigureAuth(app); }
public void Configuration(IAppBuilder app) { var _eventNotification = new NotificationService(); // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888 GlobalConfiguration.Configuration.UseSqlServerStorage("PaytimeAzureDbContext"); RecurringJob.AddOrUpdate(() => _eventNotification.GenerateNotification(), Cron.Daily(_cronHour, _cronMinutes)); //RecurringJob.AddOrUpdate(() => _eventNotification.GenerateNotification(), Cron.Daily(09, 45)); app.UseHangfireDashboard(); app.UseHangfireServer(); // Authentication app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); app.UseCookieAuthentication(new CookieAuthenticationOptions()); app.UseOpenIdConnectAuthentication( new OpenIdConnectAuthenticationOptions { ClientId = clientId, Authority = authority, PostLogoutRedirectUri = postLogoutRedirectUri, TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters() { ValidateIssuer = false, RoleClaimType = "roles" } }); }
public void Configuration(IAppBuilder app) { var config = new HttpConfiguration(); config.MapHttpAttributeRoutes(); config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; config.EnableSwagger("help/{apiVersion}", c => { c.IncludeXmlComments("Slight.WeMo.Service.XML"); c.SingleApiVersion("v1", "Slight.WeMo REST Api"); }).EnableSwaggerUi("help/ui/{*assetPath}"); app.UseWebApi(config); GlobalConfiguration.Configuration.UseMemoryStorage(); app.UseHangfireDashboard("/hangfire", new DashboardOptions { AuthorizationFilters = new IAuthorizationFilter[] { new AllowAllFilter() } }); app.UseHangfireServer(); app.Use(async (context, func) => { if (new[] { "/", "/help" }.Any(x => context.Request.Path.Value.StartsWith(x))) { context.Response.Redirect("/help/ui/index"); return; } await func.Invoke(); }); }
public void Configuration(IAppBuilder app) { app.UseOAuthBearerAuthentication(AccountController.OAuthBearerOptions); app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/Account/Login") }); app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); if (IsTrue("ExternalAuth.Facebook.IsEnabled")) { app.UseFacebookAuthentication(CreateFacebookAuthOptions()); } if (IsTrue("ExternalAuth.Twitter.IsEnabled")) { app.UseTwitterAuthentication(CreateTwitterAuthOptions()); } if (IsTrue("ExternalAuth.Google.IsEnabled")) { app.UseGoogleAuthentication(CreateGoogleAuthOptions()); } app.UseHangfireDashboard(); //Enable hangfire dashboard. }
public static void Configuration(IAppBuilder app) { // Enable the application to use a cookie to store information for the signed in user. app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/") }); // Enable the application to use a cookie to store information about a user logging // in with a third party login provider. app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); // Enable the Reddit authentication provider. app.UseRedditAuthentication(GetRedditOptions()); GlobalConfiguration.Configuration.UseSqlServerStorage("Hangfire"); app.UseHangfireDashboard("/Hangfire", new DashboardOptions { AuthorizationFilters = new[] {new HangfireDashboardAuthorizationFilter(),} }); app.UseHangfireServer(); RecurringJob.AddOrUpdate<BulkFlairUpdateJob>(FlairJobId, job => job.Execute(), Cron.Minutely); RecurringJob.AddOrUpdate<BulkLeagueUpdateJob>(LeagueJobId, job => job.Execute(), Cron.Minutely); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration.UseMongoStorage("mongodb://localhost", "StrawHatEntertainment"); app.UseHangfireDashboard("/jobs"); JobSchedulerConfig.RegisterJobs(); // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888 }
public void ConfigureOwin(IAppBuilder app, IUnityContainer container) { JobStorage.Current = CreateJobStorage(Stage.ConfigureOwin); // Configure Hangfire dashboard var securityService = container.Resolve<ISecurityService>(); var moduleInitializerOptions = container.Resolve<IModuleInitializerOptions>(); var appPath = "/" + moduleInitializerOptions.RoutePrefix; var authorizationFilters = new[] { new PermissionBasedAuthorizationFilter(securityService) { Permission = PredefinedPermissions.BackgroundJobsManage } }; var dashboardOptions = new DashboardOptions { AppPath = appPath, AuthorizationFilters = authorizationFilters }; app.UseHangfireDashboard(appPath + "hangfire", dashboardOptions); // Configure Hangfire server if (_options.StartServer) { app.UseHangfireServer(new BackgroundJobServerOptions { Activator = new UnityJobActivator(container) }); } }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage("Hangfire"); app.UseHangfireDashboard(); app.UseHangfireServer(); }
/// <summary> /// Adds Dashboard UI middleware to the OWIN request processing pipeline with the /// specified parameters. /// </summary> /// <param name="builder">OWIN application builder.</param> /// <param name="pathMatch">Path prefix for middleware to use, e.g. "/hangfire".</param> /// <param name="options">Options for Dashboard UI.</param> /// <param name="storage">Job storage to use by Dashboard IO.</param> /// /// <exception cref="ArgumentNullException"><paramref name="builder"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="pathMatch"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="options"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="storage"/> is null.</exception> /// /// <remarks> /// Please see <see cref="AppBuilderExtensions"/> for details and examples. /// </remarks> public static IAppBuilder UseHangfireDashboard( [NotNull] this IAppBuilder builder, [NotNull] string pathMatch, [NotNull] DashboardOptions options, [NotNull] JobStorage storage) { return(builder.UseHangfireDashboard(pathMatch, options, storage, null)); }
public void Configuration(IAppBuilder app) { // 如需如何設定應用程式的詳細資訊,請參閱 http://go.microsoft.com/fwlink/?LinkID=316888 GlobalConfiguration.Configuration.UseMemoryStorage(); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage("CoopCheck"); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); GlobalConfiguration.Configuration.UseSqlServerStorage("MyModelContext"); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); // Map Dashboard to the `http://<your-app>/hangfire` URL. app.UseHangfireDashboard(); }
public virtual void Configure(IAppBuilder owinApp) { owinApp.UseHangfireDashboard("/jobs", new DashboardOptions { Authorization = AuthFilters, AppPath = AppEnvironment.GetHostVirtualPath() }); }
public static void ConfigureHangfire(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard("/jobs"); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); GlobalConfiguration.Configuration.UseSqlServerStorage("ConnectionString"); app.UseHangfireDashboard(); app.UseHangfireServer(); }
private void ConfigureHangfire(IAppBuilder app) { //GlobalConfiguration.Configuration.UseSqlServerStorage(@"Data Source=(LocalDB)\MSSQLLocalDB;Database=HangfireSample"); GlobalConfiguration.Configuration.UseMemoryStorage(); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { //Reference connection string for data base of hangfire GlobalConfiguration.Configuration.UseSqlServerStorage("myConnectionString"); app.UseHangfireServer(); //activate dashboard of hangfire in application app.UseHangfireDashboard(); }
public void Configuration(IAppBuilder app) { app.UseHangfireAspNet(GetHangfireServers); app.UseHangfireDashboard(); //app.UseHangfireServer(); // Let's also create a sample background job BackgroundJob.Enqueue(() => Debug.WriteLine("Hello world from Hangfire!")); }
public void Configuration(IAppBuilder app) { app.UseHangfireServer(); var options = new DashboardOptions { Authorization = new IDashboardAuthorizationFilter[] { new DashboardAuthorizationFilter() } }; var openRemoteInvoking = ConfigurationManager.AppSettings["OpenRemoteInvoking"]; if (openRemoteInvoking == "true") { app.UseHangfireDashboard("/hangfire", options); } else { app.UseHangfireDashboard(); } }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage(@"<your_connection_string>"); app.UseHangfireServer(); app.UseHangfireDashboard(); }
public override void Configuration(IAppBuilder app) { //ensure the default options are configured base.Configuration(app); var clientId = WebConfigurationManager.AppSettings["GoogleOAuthClientID"]; var secret = WebConfigurationManager.AppSettings["GoogleOAuthSecret"]; app.ConfigureBackOfficeGoogleAuth(clientId, secret); app.MapSignalR(); if (string.Equals(ConfigurationManager.AppSettings["HangFireEnabled"], "true", StringComparison.InvariantCultureIgnoreCase) == false) { return; } // Configure hangfire var options = new SqlServerStorageOptions { PrepareSchemaIfNecessary = true }; var connectionString = Umbraco.Core.ApplicationContext.Current.DatabaseContext.ConnectionString; GlobalConfiguration.Configuration .UseSqlServerStorage(connectionString, options) .UseConsole(); var dashboardOptions = new DashboardOptions { Authorization = new[] { new UmbracoAuthorizationFilter() } }; app.UseHangfireDashboard("/hangfire", dashboardOptions); app.UseHangfireServer(); // Schedule jobs var scheduler = new ScheduleHangfireJobs(); scheduler.MarkAsSolvedReminder(); scheduler.UpdateGitHubContributors(); scheduler.UpdateMeetupStats(); scheduler.UpdateCommunityBlogPosts(); scheduler.UpdateCommunityVideos(); scheduler.UpdateVimeoVideos(); scheduler.GetGitHubPullRequests(); scheduler.RefreshKarmaStatistics(); scheduler.GenerateReleasesCache(null); scheduler.UpdateGitHubIssues(null); scheduler.UpdateAllIssues(null); scheduler.GetAllGitHubLabels(null); scheduler.AddCommentToAwaitingFeedbackIssues(null); scheduler.AddCommentToUpForGrabsIssues(null); scheduler.NotifyUnmergeablePullRequests(null); scheduler.AddCommentToStateHQDiscussionIssues(null); scheduler.CheckContributorBadge(null); scheduler.GetNugetDownloads(null); }
private static void ConfigureHangfire(IAppBuilder app) { app.UseHangfireAspNet(GetHangfireConfiguration); app.UseHangfireDashboard("/hangfire", new DashboardOptions { AppPath = VirtualPathUtility.ToAbsolute("~") }); }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); app.UseHangfireServer(); app.UseHangfireDashboard("/jobs", new DashboardOptions { Authorization = new[] { new HangfireDashboardFilter() } }); }
public void Configuration(IAppBuilder app) { string ConnectionString = ConfigurationManager.ConnectionStrings["dataSocket"].ConnectionString; ConfigureAuth(app); GlobalConfiguration.Configuration.UseSqlServerStorage(ConnectionString); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { #region When making calls to Rest services, deactivating the NagleAlgorithm can reduce latency when the data transferred over the network is small. // refer: https://alexandrebrisebois.wordpress.com/2013/03/24/why-are-webrequests-throttled-i-want-more-throughput/ ServicePointManager.UseNagleAlgorithm = false; ServicePointManager.DefaultConnectionLimit = 1000; #endregion #region Initialize log4net with local configuration file when other methods not working // Refer: https://stackify.com/making-log4net-net-core-work/?utm_referrer=https%3A%2F%2Fwww.google.ca%2F //var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); //XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config")); // Refer: https://stackoverflow.com/questions/21166126/log4net-separate-config-file-not-working XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(AppDomain.CurrentDomain.BaseDirectory + "logging.config")); #endregion #region Initialize Hangfire #region database connection string and custom schema // simple //GlobalConfiguration.Configuration.UseSqlServerStorage("SysDb"); // more control options var conn = ConfigurationManager.ConnectionStrings["SysDb"].ConnectionString; var options = new SqlServerStorageOptions { SchemaName = "Hangfire.RT2020.Bot" }; Hangfire.GlobalConfiguration.Configuration.UseSqlServerStorage(conn, options); #endregion #region Hangfire 祇容許 localhost,要用 MyAuthorizationFilter 搞 // refer: http://docs.hangfire.io/en/latest/configuration/using-dashboard.html?highlight=authorization#configuring-authorization var dashOptions = new DashboardOptions { AppPath = VirtualPathUtility.ToAbsolute("~"), Authorization = new[] { new MyAuthorizationFilter() } }; app.UseHangfireDashboard("/hangfire", dashOptions); #endregion app.UseHangfireServer(); #endregion var config = new HttpConfiguration(); SwaggerConfig.Register(config); WebApiConfig.Register(config); // 2020.11.11 paulus: Hangfire v1.7.17: UseWebApi 要加 package: Microsoft.AspNet.WebApi.OwinSelfHost // refer: https://stackoverflow.com/a/38309141 app.UseWebApi(config); }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); GlobalConfiguration.Configuration.UseNinjectActivator(new Bootstrapper().Kernel); GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); app.UseHangfireServer(); app.UseHangfireDashboard(); }
public static void Config(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnectionString"); app.UseHangfireDashboard(); app.UseHangfireServer(); RecurringJob.AddOrUpdate(() => Console.WriteLine("Daily Job"), Cron.Minutely); }
// This code configures Web API. The Startup class is specified as a type // parameter in the WebApp.Start method. public void Configuration(IAppBuilder appBuilder) { GlobalConfiguration.Configuration.UseSqlServerStorage("HighlighterDb"); appBuilder.UseHangfireDashboard("/hangfire", new DashboardOptions { AuthorizationFilters = new[] { new MyRestrictiveAuthorizationFilter() } }); appBuilder.UseHangfireDashboard(); appBuilder.UseHangfireServer(); // Configure Web API for self-host. HttpConfiguration config = new HttpConfiguration(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); appBuilder.UseWebApi(config); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("BookServiceContext"); GlobalConfiguration.Configuration.UseNinjectActivator(new Ninject.Web.Common.Bootstrapper().Kernel); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public HangfireConfig(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard(); app.UseHangfireServer(); new Tarefas(); }
public void Configuration(IAppBuilder app) { // GlobalConfiguration usage was removed for clarity. var options = new DashboardOptions { AppPath = "/app" }; app.UseHangfireDashboard("/hangfire", options); }
public void Configuration(IAppBuilder app, ILifetimeScope lifetimeScope) { var config = GlobalConfiguration.Configuration; config.UseMemoryStorage(); config.UseAutofacActivator(lifetimeScope); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { app.UseHangfireDashboard("/" + Dev2.Common.Config.Persistence.DashboardName); app.UseHangfireServer(new BackgroundJobServerOptions() { ServerName = Dev2.Common.Config.Persistence.ServerName, ServerTimeout = TimeSpan.FromMinutes(10) }); }
public void Configuration(IAppBuilder app) { app.UseHangfireDashboard("/admin", new DashboardOptions { Authorization = new[] { new MyAuthorizationFilter() } }); HangfireJobs.StartJobs(); }
public void Configuration(IAppBuilder app) { var constr = @"Data Source=localhost;Initial Catalog=HangfireJob;Integrated Security=True"; GlobalConfiguration.Configuration.UseSqlServerStorage(constr); app.UseHangfireDashboard(); // app.UseHangfireServer(); ★ここを削除 }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("connStr"); app.UseHangfireDashboard("/hangfire", new DashboardOptions { //hangfire 身份验证过滤器 Authorization = new[] { new CustomerHangfireDashboardFilter() }, }); }
public void Configuration(IAppBuilder app) { //Db Bilgilerimizi bu alana giriyoruz. GlobalConfiguration.Configuration.UseSqlServerStorage(@"Server=SİZİN_LOCALHOST;Database=Hangfire;Integrated Security=true"); //Dashboardunu aktif ediyoruz. app.UseHangfireDashboard(); //Serverı aktif hale getiriyoruz. app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { ConfigureAuth(app); GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard(); RecurringJob.AddOrUpdate(() => MessagingService.SendReminders(), Cron.Minutely); }
public void ConfigureHangfire(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection").UseNLogLogProvider(); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { AuthorizationFilters = new[] { new HangfireDashboardAuthorizationFilter() } }); // This will configure the current application to run the Hangfire Dashboard with the configured connection. }
public void ConfigureHangfire(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection").UseNLogLogProvider(); app.UseHangfireDashboard(); // This will configure the current application to run the Hangfire Dashboard with the configured connection. app.UseHangfireServer(); // This will configure the current application to run the Hangfire Server with the configured connection. ConfigureRecurringJobs(); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("Tenants"); app.UseHangfireDashboard("/jobqueue", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } }); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration.UseSqlServerStorage("HangfireConnection"); app.UseHangfireServer(); app.UseHangfireDashboard("/desktopmodules/hangfire", new DashboardOptions { Authorization = new[] { new DnnAuthorizationFilter() } }); }
public void Configuration(IAppBuilder app) { app.MapSignalR(); GlobalConfiguration.Configuration.UseMemoryStorage(); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { app.UseHangfireServer(); app.UseHangfireDashboard(string.Empty); var taskExample = new TaskExample(); RecurringJob.AddOrUpdate(() => taskExample.TaskMethod(null), Cron.Minutely); }
public void Configuration(IAppBuilder app) { // 如需如何設定應用程式的詳細資訊,請參閱 http://go.microsoft.com/fwlink/?LinkID=316888 // 指定Hangfire使用記憶體儲存任務 GlobalConfiguration.Configuration.UseMemoryStorage(); // 啟用HanfireServer app.UseHangfireServer(); // 啟用Hangfire的Dashboard app.UseHangfireDashboard(); }
public void Configure(IAppBuilder appBuilder) { var dataProviderManager = EngineContext.Current.Resolve<BaseDataProviderManager>(); Guard.NotNull(dataProviderManager); var connectionString = dataProviderManager.DataSettings.DataConnectionString; GlobalConfiguration.Configuration.UseSqlServerStorage(connectionString); appBuilder.UseHangfireDashboard(); appBuilder.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888 //app.UseErrorPage(); //app.UseWelcomePage("/"); app.UseHangfireDashboard("/"); GlobalConfiguration.Configuration.UseSqlServerStorage( "Tailspin.Jobs.Properties.Settings.DefaultConnection", new SqlServerStorageOptions { QueuePollInterval = TimeSpan.FromSeconds(1) }); app.UseHangfireDashboard(); app.UseHangfireServer(); RecurringJob.AddOrUpdate( () => Console.WriteLine("{0} Recurring job completed successfully!", DateTime.Now.ToString()), Cron.Minutely); }
public void Configuration(IAppBuilder app) { ConnectionStringSettings connString; GlobalConfiguration.Configuration .UseLogProvider(new ColouredConsoleLogProvider()) .UseSqlServerStorage(ConfigurationManager.ConnectionStrings["billingScheduler"].ConnectionString); app.UseHangfireServer(); app.UseHangfireDashboard(); }
public void Configuration(IAppBuilder app) { ConfigureEnabledHangfireJobStorage(Settings.Default.JobStorageName); // Map Dashboard to the `http://<your-app>/jobs` URL. app.UseHangfireDashboard("/jobs"); app.UseHangfireServer(); LogProvider.SetCurrentLogProvider(new ElmahLogProvider(LogLevel.Info)); }
public void Configuration(IAppBuilder app) { var Container = new ContainerBuilder(); Container.RegisterAssemblyModules(typeof(MvcApplication).Assembly); var iContainer = Container.Build(); app.UseHangfireDashboard(); app.UseHangfireServer(); taskProcessor = iContainer.Resolve<ITaskProcessor>(); }
// Config public void Configuration(IAppBuilder app) { ConfigureAuth(app); GlobalConfiguration.Configuration .UseSqlServerStorage("DefaultConnection"); app.UseHangfireDashboard(); app.UseHangfireServer(); RecurringJob.AddOrUpdate("report",() => ToolConfigurationController.SendEmailReport(), Cron.Daily(13,00)); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage( "MailerDb", new SqlServerStorageOptions { QueuePollInterval = TimeSpan.FromSeconds(1) }) .UseFilter(new LogFailureAttribute()); app.UseHangfireDashboard(); app.UseHangfireServer(); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration.UseMemoryStorage(); GlobalConfiguration.Configuration.UseNinjectActivator(NinjectWebCommon.kernel); app.UseHangfireDashboard(); app.UseHangfireServer(); var options = new BackgroundJobServerOptions(); LogProvider.SetCurrentLogProvider(new RollbarLogProvider()); RecurringJob.AddOrUpdate<SuperJob>(sb => sb.DoIt(), Cron.Minutely()); }
public void Configuration(IAppBuilder app) { GlobalConfiguration.Configuration .UseSqlServerStorage(@"Server=.\sqlexpress;Database=Hangfire.Sample;Trusted_Connection=True;") //.UseMsmqQueues(@".\Private$\hangfire{0}", "default", "critical") .UseDashboardMetric(SqlServerStorage.ActiveConnections) .UseDashboardMetric(SqlServerStorage.TotalConnections) .UseDashboardMetric(DashboardMetrics.FailedCount); app.UseHangfireDashboard(); }