✨ File expiration
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using DysonNetwork.Drive.Storage;
|
||||
using Quartz;
|
||||
|
||||
namespace DysonNetwork.Drive.Startup;
|
||||
@@ -14,6 +15,13 @@ public static class ScheduledJobsConfiguration
|
||||
.ForJob(appDatabaseRecyclingJob)
|
||||
.WithIdentity("AppDatabaseRecyclingTrigger")
|
||||
.WithCronSchedule("0 0 0 * * ?"));
|
||||
|
||||
var cloudFileUnusedRecyclingJob = new JobKey("CloudFileUnusedRecycling");
|
||||
q.AddJob<CloudFileUnusedRecyclingJob>(opts => opts.WithIdentity(cloudFileUnusedRecyclingJob));
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(cloudFileUnusedRecyclingJob)
|
||||
.WithIdentity("CloudFileUnusedRecyclingTrigger")
|
||||
.WithCronSchedule("0 0 0 * * ?"));
|
||||
});
|
||||
services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);
|
||||
|
||||
|
Reference in New Issue
Block a user