Subscription and stellar program

This commit is contained in:
2025-06-22 17:57:19 +08:00
parent 9fd6016308
commit 698442ad13
10 changed files with 296 additions and 21 deletions

View File

@ -1,5 +1,6 @@
using DysonNetwork.Sphere.Storage;
using DysonNetwork.Sphere.Storage.Handlers;
using DysonNetwork.Sphere.Wallet;
using Quartz;
namespace DysonNetwork.Sphere.Startup;
@ -64,6 +65,16 @@ public static class ScheduledJobsConfiguration
.WithIntervalInMinutes(1)
.RepeatForever())
);
var subscriptionRenewalJob = new JobKey("SubscriptionRenewal");
q.AddJob<SubscriptionRenewalJob>(opts => opts.WithIdentity(subscriptionRenewalJob));
q.AddTrigger(opts => opts
.ForJob(subscriptionRenewalJob)
.WithIdentity("SubscriptionRenewalTrigger")
.WithSimpleSchedule(o => o
.WithIntervalInMinutes(30)
.RepeatForever())
);
});
services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);