Update Notification Refactor (#511)
* Replaced profile links to anchors so we can open in new tab if we like * Refactored how update checking works. We now explicitly check and send back on the same API. We have a weekly job that will push an update to the user. * Implemented a changelog tab * Ported over a GA fix for using ' in PR bodies. * Don't check cert for Github
This commit is contained in:
parent
0e48aeebc5
commit
2a76092566
21 changed files with 246 additions and 56 deletions
|
|
@ -70,6 +70,8 @@ namespace API.Services
|
|||
}
|
||||
|
||||
RecurringJob.AddOrUpdate("cleanup", () => _cleanupService.Cleanup(), Cron.Daily);
|
||||
|
||||
RecurringJob.AddOrUpdate("check-for-updates", () => _scannerService.ScanLibraries(), Cron.Daily);
|
||||
}
|
||||
|
||||
#region StatsTasks
|
||||
|
|
@ -104,7 +106,7 @@ namespace API.Services
|
|||
public void ScheduleUpdaterTasks()
|
||||
{
|
||||
_logger.LogInformation("Scheduling Auto-Update tasks");
|
||||
RecurringJob.AddOrUpdate("check-updates", () => _versionUpdaterService.CheckForUpdate(), Cron.Daily);
|
||||
RecurringJob.AddOrUpdate("check-updates", () => CheckForUpdate(), Cron.Weekly);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -152,9 +154,13 @@ namespace API.Services
|
|||
BackgroundJob.Enqueue(() => _backupService.BackupDatabase());
|
||||
}
|
||||
|
||||
public void CheckForUpdate()
|
||||
/// <summary>
|
||||
/// Not an external call. Only public so that we can call this for a Task
|
||||
/// </summary>
|
||||
public async Task CheckForUpdate()
|
||||
{
|
||||
BackgroundJob.Enqueue(() => _versionUpdaterService.CheckForUpdate());
|
||||
var update = await _versionUpdaterService.CheckForUpdate();
|
||||
await _versionUpdaterService.PushUpdate(update);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue