Moved some cleanup tasks within another task to ensure everything is processed at the same time.
This commit is contained in:
parent
723fde6850
commit
d2c3bd7f1c
2 changed files with 2 additions and 12 deletions
|
@ -34,7 +34,6 @@ public interface ITaskScheduler
|
|||
void ScanSiteThemes();
|
||||
void CovertAllCoversToEncoding();
|
||||
Task CleanupDbEntries();
|
||||
Task ScrobbleUpdates(int userId);
|
||||
|
||||
}
|
||||
public class TaskScheduler : ITaskScheduler
|
||||
|
@ -141,7 +140,6 @@ public class TaskScheduler : ITaskScheduler
|
|||
}
|
||||
|
||||
RecurringJob.AddOrUpdate(CleanupTaskId, () => _cleanupService.Cleanup(), Cron.Daily, RecurringJobOptions);
|
||||
RecurringJob.AddOrUpdate(CleanupDbTaskId, () => _cleanupService.CleanupDbEntries(), Cron.Daily, RecurringJobOptions);
|
||||
RecurringJob.AddOrUpdate(RemoveFromWantToReadTaskId, () => _cleanupService.CleanupWantToRead(), Cron.Daily, RecurringJobOptions);
|
||||
RecurringJob.AddOrUpdate(UpdateYearlyStatsTaskId, () => _statisticService.UpdateServerStatistics(), Cron.Monthly, RecurringJobOptions);
|
||||
|
||||
|
@ -272,16 +270,6 @@ public class TaskScheduler : ITaskScheduler
|
|||
await _cleanupService.CleanupDbEntries();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TODO: Remove this for Release
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task ScrobbleUpdates(int userId)
|
||||
{
|
||||
if (!await _licenseService.HasActiveLicense()) return;
|
||||
BackgroundJob.Enqueue(() => _scrobblingService.ProcessUpdatesSinceLastSync());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to call ScanLibraries on ScannerService, but if another scan task is in progress, will reschedule the invocation for 3 hours in future.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue