Skip to content

Commit 11c27c4

Browse files
Re-add jobs
1 parent 40c8917 commit 11c27c4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

OurUmbraco/NotificationsCore/Notifications/ScheduleHangfireJobs.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public class ScheduleHangfireJobs
1313
public void UpdateCommunityBlogPosts(PerformContext context)
1414
{
1515
var service = new BlogPostsService();
16-
RecurringJob.AddOrUpdate(() => service.UpdateBlogPostsJsonFile(context), Cron.HourInterval(1));
16+
RecurringJob.AddOrUpdate<BlogPostsService>("📝 Community blog posts", x => x.UpdateBlogPostsJsonFile(context), Cron.HourInterval(1));
1717
}
1818

1919
public void GetGitHubPullRequests()
2020
{
21-
RecurringJob.AddOrUpdate(() => UpdatePullRequests(), Cron.HourInterval(1));
21+
RecurringJob.AddOrUpdate<ScheduleHangfireJobs>("🚀 Get Umbraco-CMS PRs", x => x.UpdatePullRequests(), Cron.HourInterval(1));
2222
}
2323

2424
public void UpdatePullRequests()
@@ -30,25 +30,25 @@ public void UpdatePullRequests()
3030
public void GenerateReleasesCache(PerformContext context)
3131
{
3232
var releasesService = new ReleasesService();
33-
RecurringJob.AddOrUpdate(() => releasesService.GenerateReleasesCache(context), Cron.HourInterval(1));
33+
RecurringJob.AddOrUpdate<ReleasesService>("💎 Release cache", x => x.GenerateReleasesCache(context), Cron.HourInterval(1));
3434
}
3535

3636
public void UpdateGitHubIssues(PerformContext context)
3737
{
3838
var gitHubService = new GitHubService();
3939
var repository = new Community.Models.Repository("Umbraco-CMS", "umbraco", "Umbraco-CMS", "Umbraco-CMS");
40-
RecurringJob.AddOrUpdate($"[IssueTracker] Update {repository.Name}", () => gitHubService.UpdateIssues(context, repository), Cron.MinuteInterval(15));
40+
RecurringJob.AddOrUpdate($"📝 Update issues {repository.Name}", () => gitHubService.UpdateIssues(context, repository), Cron.MinuteInterval(15));
4141
}
4242

4343
public void FetchStaticApiDocumentation(PerformContext context)
4444
{
4545
var staticApiDocumentationService = new StaticApiDocumentationService();
46-
RecurringJob.AddOrUpdate(() => staticApiDocumentationService.FetchNewApiDocs(context), Cron.MinuteInterval(5));
46+
RecurringJob.AddOrUpdate<StaticApiDocumentationService>("📝 Docs", x => x.FetchNewApiDocs(context), Cron.MinuteInterval(5));
4747
}
4848
public void FetchMastodonPosts(PerformContext context)
4949
{
5050
var mastodonService = new MastodonService();
51-
RecurringJob.AddOrUpdate(() => mastodonService.GetStatuses(10), Cron.MinuteInterval(2));
51+
RecurringJob.AddOrUpdate<MastodonService>("️💥 Get Masto posts", x => x.GetStatuses(10), Cron.MinuteInterval(2));
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)