Exemplo n.º 1
0
        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);

            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);
            var dashboardOptions = new DashboardOptions {
                Authorization = new[] { new UmbracoAuthorizationFilter() }
            };

            app.UseHangfireDashboard("/hangfire", dashboardOptions);
            app.UseHangfireServer();

            // Schedule jobs
            var scheduler = new ScheduleHangfireJobs();

            scheduler.MarkAsSolvedReminder();
        }
        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);
        }
        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();

            //Hangfire jobs for Google Maps aka Radar
            var radarScheduler = new RadarHangfireJobs();

            radarScheduler.FindSignals();
        }