♻️ Better delivery service for AP

This commit is contained in:
2026-01-01 01:20:44 +08:00
parent c59fc011f4
commit 14d5254461
13 changed files with 3091 additions and 139 deletions

View File

@@ -1,3 +1,4 @@
using DysonNetwork.Sphere.ActivityPub;
using DysonNetwork.Sphere.Post;
using DysonNetwork.Sphere.Publisher;
using DysonNetwork.Sphere.WebReader;
@@ -39,6 +40,22 @@ public static class ScheduledJobsConfiguration
.WithIdentity("PublisherSettlementTrigger")
.WithCronSchedule("0 0 0 * * ?")
);
q.AddJob<ActivityPubDeliveryRetryJob>(opts => opts.WithIdentity("ActivityPubDeliveryRetry"));
q.AddTrigger(opts => opts
.ForJob("ActivityPubDeliveryRetry")
.WithIdentity("ActivityPubDeliveryRetryTrigger")
.WithSimpleSchedule(o => o
.WithIntervalInMinutes(1)
.RepeatForever())
);
q.AddJob<ActivityPubDeliveryCleanupJob>(opts => opts.WithIdentity("ActivityPubDeliveryCleanup"));
q.AddTrigger(opts => opts
.ForJob("ActivityPubDeliveryCleanup")
.WithIdentity("ActivityPubDeliveryCleanupTrigger")
.WithCronSchedule("0 0 3 * * ?")
);
});
services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);