auto license fetching now and generator more solid

This commit is contained in:
2020-06-15 19:26:29 +00:00
parent 69030bd767
commit 59f4c6a9d2
7 changed files with 38 additions and 18 deletions

View File

@@ -161,14 +161,7 @@ namespace AyaNova.Biz
//### Critical internal jobs, these run even if there is a license related serverlock
//LICENSE FETCH
await CoreJobLicense.DoWorkAsync();
//"SHENANIGAN" CHECK
if (await UserBiz.ActiveCountAsync() > AyaNova.Core.License.ActiveKey.ActiveNumber)
{
var msg = $"E1020 - Active count exceeded capacity";
ServiceProviderProvider.ServerState.SetSystemLock(msg);
log.LogCritical(msg);
return;
}
//METRICS
CoreJobMetricsSnapshot.DoWork();
@@ -178,6 +171,14 @@ namespace AyaNova.Biz
//system lock (no license) is a complete deal breaker for continuation beyond here
if (serverState.IsSystemLocked) return;
//"SHENANIGAN" CHECK, note, must be here after systemlock because it relies on there being a license
if (await UserBiz.ActiveCountAsync() > AyaNova.Core.License.ActiveKey.ActiveNumber)
{
var msg = $"E1020 - Active count exceeded capacity";
ServiceProviderProvider.ServerState.SetSystemLock(msg);
log.LogCritical(msg);
return;
}
//TODO: NOTIFICATIONS
//await CoreJobNotify.DoWorkAsync();