✨ Subscription and stellar program
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user