This commit is contained in:
2020-07-29 23:13:20 +00:00
parent b30a911351
commit 90052f1000
7 changed files with 40 additions and 28 deletions

View File

@@ -182,14 +182,16 @@ namespace AyaNova.Biz
//system lock (no license) is a complete deal breaker for continuation beyond here
if (serverState.IsSystemLocked) return;
//Moved the following user count checker to within JOB SWEEPER so that it only checks on every half hour so it's less obvious in logs with full trace on and
//also so someone fucking with the system won't get locked out right away.
//"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;
}
// if (await UserBiz.ActiveCountAsync() > AyaNova.Core.License.ActiveKey.ActiveNumber)
// {
// var msg = $"E1020 - Active count exceeded capacity";
// ServiceProviderProvider.ServerState.SetSystemLock(msg);
// log.LogCritical(msg);
// return;
// }
//BACKUP
@@ -199,7 +201,7 @@ namespace AyaNova.Biz
await CoreJobNotify.DoWorkAsync();
await CoreNotificationSweeper.DoWorkAsync();
//JOB SWEEPER
//JOB SWEEPER / AND USER COUNT CHECK
await CoreJobSweeper.DoWorkAsync();
//### API Open only jobs