case 4491

This commit is contained in:
2023-04-25 00:03:57 +00:00
parent 5daebd8509
commit 99dfbfbb98
4 changed files with 128 additions and 5 deletions

View File

@@ -22,11 +22,23 @@ namespace AyaNova.Util
internal static GlobalOpsBackupSettings Backup { get; set; }
internal static GlobalOpsNotificationSettings Notify { get; set; }
internal static DateTime NextBackup { get; set; }
//VERSION CHECKING
//set by CoreJobVersionCheck once daily and kept here statically while server is up
internal static string LATEST_VERSION { get; set; }
internal static string CHANGE_LOG_URL { get; set; }
/// <summary>
/// Populate and / or create the settings
/// </summary>
internal static void Initialize(AyContext ct = null)
{
//set to current servers boot version so as to not trigger messaging at client on login until job has had a chance to set
LATEST_VERSION = Util.AyaNovaVersion.VersionString;
CHANGE_LOG_URL = "https://ayanova.com/docs/changelog/";//just something to default to, should never come up as it's not a different version at this point
//fetch or create as not provided (meaning this was called from Startup.cs)
Backup = ct.GlobalOpsBackupSettings.FirstOrDefault(z => z.Id == 1);
if (Backup == null)