refactor(archival): ♻ make Hangfire using conditional

This commit is contained in:
Collin M. Barrett 2020-09-19 09:28:26 -05:00
parent 0d1a7a2f96
commit 18444c0117

View file

@ -2,7 +2,6 @@
using FilterLists.Archival.Application.Commands;
using FilterLists.Archival.Infrastructure;
using FilterLists.Archival.Infrastructure.Scheduling;
using Hangfire;
using MediatR;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
@ -37,7 +36,7 @@ private static void ScheduleArchival(this IApplicationBuilder app)
#if DEBUG
new EnqueueArchiveAllLists.Command().EnqueueBackgroundJob();
#else
new EnqueueArchiveAllLists.Command().AddOrUpdateRecurringJob(Cron.Daily);
new EnqueueArchiveAllLists.Command().AddOrUpdateRecurringJob(Hangfire.Cron.Daily);
#endif
}
}