diff --git a/.vscode/launch.json b/.vscode/launch.json index b77f3b95..ed2bc750 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -42,8 +42,8 @@ "ASPNETCORE_ENVIRONMENT": "Development", "AYANOVA_JWT_SECRET": "UNLICENSED5G*QQJ8#bQ7$Xr_@sXfHq4", //"AYANOVA_SET_SUPERUSER_PW": "l3tm3in", - "AYANOVA_LOG_LEVEL": "Info", - // "AYANOVA_LOG_LEVEL": "Debug", + //"AYANOVA_LOG_LEVEL": "Info", + "AYANOVA_LOG_LEVEL": "Debug", // "AYANOVA_LOG_LEVEL": "Trace", "AYANOVA_DEFAULT_TRANSLATION": "en", //TRANSLATION MUST BE en for Integration TESTING diff --git a/server/AyaNova/Controllers/ServerStateController.cs b/server/AyaNova/Controllers/ServerStateController.cs index 02963f40..e38dbe15 100644 --- a/server/AyaNova/Controllers/ServerStateController.cs +++ b/server/AyaNova/Controllers/ServerStateController.cs @@ -83,6 +83,11 @@ namespace AyaNova.Api.Controllers log.LogInformation($"ServerState change request by user {UserNameFromContext.Name(HttpContext.Items)} from current state of \"{serverState.GetState().ToString()}\" to \"{desiredState.ToString()}-{state.Reason}\""); + if (desiredState == ApiServerState.ServerState.MigrateMode) + ServerBootConfig.MIGRATING = true; + else + ServerBootConfig.MIGRATING = false; + //Add a message if user didn't enter one so other users know why they can't login if (string.IsNullOrWhiteSpace(state.Reason)) { diff --git a/server/AyaNova/biz/ContractBiz.cs b/server/AyaNova/biz/ContractBiz.cs index 5321a6b0..5e16252f 100644 --- a/server/AyaNova/biz/ContractBiz.cs +++ b/server/AyaNova/biz/ContractBiz.cs @@ -651,7 +651,7 @@ MULTIPLE discount / markup ITEMS public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/CustomerBiz.cs b/server/AyaNova/biz/CustomerBiz.cs index 6f135174..a9052e04 100644 --- a/server/AyaNova/biz/CustomerBiz.cs +++ b/server/AyaNova/biz/CustomerBiz.cs @@ -268,7 +268,7 @@ namespace AyaNova.Biz private async Task ValidateAsync(Customer proposedObj, Customer currentObj) { //skip validation if seeding - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING) return; bool isNew = currentObj == null; @@ -525,7 +525,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/CustomerNoteBiz.cs b/server/AyaNova/biz/CustomerNoteBiz.cs index 25fd0fba..95fee497 100644 --- a/server/AyaNova/biz/CustomerNoteBiz.cs +++ b/server/AyaNova/biz/CustomerNoteBiz.cs @@ -258,7 +258,7 @@ namespace AyaNova.Biz // public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); diff --git a/server/AyaNova/biz/CustomerServiceRequestBiz.cs b/server/AyaNova/biz/CustomerServiceRequestBiz.cs index 214758a4..c4666d52 100644 --- a/server/AyaNova/biz/CustomerServiceRequestBiz.cs +++ b/server/AyaNova/biz/CustomerServiceRequestBiz.cs @@ -495,7 +495,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/HeadOfficeBiz.cs b/server/AyaNova/biz/HeadOfficeBiz.cs index 0dce26a3..4edb437e 100644 --- a/server/AyaNova/biz/HeadOfficeBiz.cs +++ b/server/AyaNova/biz/HeadOfficeBiz.cs @@ -251,7 +251,7 @@ namespace AyaNova.Biz private async Task ValidateAsync(HeadOffice proposedObj, HeadOffice currentObj) { //skip validation if seeding - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING) return; bool isNew = currentObj == null; @@ -472,7 +472,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/JobsBiz.cs b/server/AyaNova/biz/JobsBiz.cs index b5b16887..5b5a3101 100644 --- a/server/AyaNova/biz/JobsBiz.cs +++ b/server/AyaNova/biz/JobsBiz.cs @@ -170,9 +170,10 @@ namespace AyaNova.Biz return; } ActivelyProcessing = true; + log.LogDebug("Processing internal jobs"); try { - log.LogDebug("Processing critical internal jobs"); + log.LogTrace("Processing level 1 internal jobs"); //### Critical internal jobs, these run even if there is a license related serverlock //LICENSE FETCH await CoreJobLicense.DoWorkAsync(); @@ -186,7 +187,12 @@ namespace AyaNova.Biz //system lock (no license) is a complete deal breaker for continuation beyond here if (serverState.IsSystemLocked) return; - log.LogDebug("Processing semi-critical internal jobs"); + if (serverState.IsMigrateMode){ + log.LogInformation("Server is in migrate mode, skipping non-critical internal jobs"); + return; + } + + log.LogTrace("Processing level 2 internal jobs"); // #if (DEBUG) // log.LogInformation("Processing semi-critical internal jobs (backup, pm, notification etc)"); @@ -212,7 +218,7 @@ namespace AyaNova.Biz //Clean temp folder CoreJobTempFolderCleanup.DoWork(); - log.LogDebug("Processing exclusive dynamic jobs"); + log.LogTrace("Processing exclusive dynamic jobs"); //BIZOBJECT DYNAMIC JOBS //get a list of exclusive jobs that are due to happen @@ -236,14 +242,14 @@ namespace AyaNova.Biz //### API Open only jobs if (!serverState.IsOpen) { - log.LogDebug("Server state is NOT open, skipping processing non-exclusive dynamic jobs"); + log.LogTrace("Server state is NOT open, skipping processing non-exclusive dynamic jobs"); return; } /////////////////////////////////////// //NON-EXCLUSIVE JOBS // - log.LogDebug("Processing non-exclusive dynamic jobs"); + log.LogTrace("Processing non-exclusive dynamic jobs"); //These fire and forget but use a technique to bubble up exceptions anyway List sharedJobs = await GetReadyJobsNotExlusiveOnlyAsync(); diff --git a/server/AyaNova/biz/LoanUnitBiz.cs b/server/AyaNova/biz/LoanUnitBiz.cs index 6afff842..3946463b 100644 --- a/server/AyaNova/biz/LoanUnitBiz.cs +++ b/server/AyaNova/biz/LoanUnitBiz.cs @@ -434,7 +434,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/MemoBiz.cs b/server/AyaNova/biz/MemoBiz.cs index 1cabb456..e63c6dfa 100644 --- a/server/AyaNova/biz/MemoBiz.cs +++ b/server/AyaNova/biz/MemoBiz.cs @@ -204,7 +204,7 @@ namespace AyaNova.Biz { //skip validation if seeding - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING ) return; //Only can send a memo from your own account //with bypass for import if superuser @@ -436,7 +436,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/NotifyEventHelper.cs b/server/AyaNova/biz/NotifyEventHelper.cs index fe4bc7ce..8911b3a6 100644 --- a/server/AyaNova/biz/NotifyEventHelper.cs +++ b/server/AyaNova/biz/NotifyEventHelper.cs @@ -410,7 +410,7 @@ namespace AyaNova.Biz // //will iterate the subscriptions and see if any apply here // internal static async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel newObject, ICoreBizObjectModel originalObject = null) // { -// if (ServerBootConfig.SEEDING) return; +// if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; // log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{newObject.AyaType}, AyaEvent:{ayaEvent}]"); // //set to true if any changes are made to the context (NotifyEvent added) // bool SaveContext = false; diff --git a/server/AyaNova/biz/PMBiz.cs b/server/AyaNova/biz/PMBiz.cs index 43536fc1..1b241474 100644 --- a/server/AyaNova/biz/PMBiz.cs +++ b/server/AyaNova/biz/PMBiz.cs @@ -606,7 +606,7 @@ namespace AyaNova.Biz //This may become necessary for v8migrate, leaving out for now //skip validation if seeding - //if (ServerBootConfig.SEEDING) return; + //if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -948,7 +948,7 @@ namespace AyaNova.Biz public async Task PMHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -1377,7 +1377,7 @@ namespace AyaNova.Biz public async Task ItemHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -1604,7 +1604,7 @@ namespace AyaNova.Biz private async Task ExpenseValidateAsync(PMItemExpense proposedObj, PMItemExpense currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -1730,7 +1730,7 @@ namespace AyaNova.Biz public async Task ExpenseHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2015,7 +2015,7 @@ namespace AyaNova.Biz private async Task LaborValidateAsync(PMItemLabor proposedObj, PMItemLabor currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2101,7 +2101,7 @@ namespace AyaNova.Biz public async Task LaborHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2410,7 +2410,7 @@ namespace AyaNova.Biz private async Task LoanValidateAsync(PMItemLoan proposedObj, PMItemLoan currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2488,7 +2488,7 @@ namespace AyaNova.Biz public async Task LoanHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2718,7 +2718,7 @@ namespace AyaNova.Biz private async Task OutsideServiceValidateAsync(PMItemOutsideService proposedObj, PMItemOutsideService currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2795,7 +2795,7 @@ namespace AyaNova.Biz OutsideServiceReceived = 17,//* Workorder object , WorkorderItemOutsideService updated, instant notification when item received, tag filterable */ ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3157,7 +3157,7 @@ namespace AyaNova.Biz private async Task PartValidateAsync(PMItemPart proposedObj, PMItemPart currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3233,7 +3233,7 @@ namespace AyaNova.Biz public async Task PartHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3384,7 +3384,7 @@ namespace AyaNova.Biz private async Task ScheduledUserValidateAsync(PMItemScheduledUser proposedObj, PMItemScheduledUser currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3467,7 +3467,7 @@ namespace AyaNova.Biz public async Task ScheduledUserHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3647,7 +3647,7 @@ namespace AyaNova.Biz private async Task TaskValidateAsync(PMItemTask proposedObj, PMItemTask currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3730,7 +3730,7 @@ namespace AyaNova.Biz public async Task TaskHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4017,7 +4017,7 @@ namespace AyaNova.Biz private async Task TravelValidateAsync(PMItemTravel proposedObj, PMItemTravel currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4087,7 +4087,7 @@ namespace AyaNova.Biz public async Task TravelHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4295,7 +4295,7 @@ namespace AyaNova.Biz private async Task UnitValidateAsync(PMItemUnit proposedObj, PMItemUnit currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; @@ -4370,7 +4370,7 @@ namespace AyaNova.Biz public async Task UnitHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/PartAssemblyBiz.cs b/server/AyaNova/biz/PartAssemblyBiz.cs index 4764c447..6882cc7c 100644 --- a/server/AyaNova/biz/PartAssemblyBiz.cs +++ b/server/AyaNova/biz/PartAssemblyBiz.cs @@ -480,7 +480,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/PartBiz.cs b/server/AyaNova/biz/PartBiz.cs index 61fe2762..adc2219b 100644 --- a/server/AyaNova/biz/PartBiz.cs +++ b/server/AyaNova/biz/PartBiz.cs @@ -659,7 +659,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/PartWarehouseBiz.cs b/server/AyaNova/biz/PartWarehouseBiz.cs index 35684286..d9c47744 100644 --- a/server/AyaNova/biz/PartWarehouseBiz.cs +++ b/server/AyaNova/biz/PartWarehouseBiz.cs @@ -433,7 +433,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/ProjectBiz.cs b/server/AyaNova/biz/ProjectBiz.cs index b9465b7f..a3dde959 100644 --- a/server/AyaNova/biz/ProjectBiz.cs +++ b/server/AyaNova/biz/ProjectBiz.cs @@ -427,7 +427,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/PurchaseOrderBiz.cs b/server/AyaNova/biz/PurchaseOrderBiz.cs index 9f9e0e1f..9cab1a6d 100644 --- a/server/AyaNova/biz/PurchaseOrderBiz.cs +++ b/server/AyaNova/biz/PurchaseOrderBiz.cs @@ -853,7 +853,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/QuoteBiz.cs b/server/AyaNova/biz/QuoteBiz.cs index bcf8b958..80e2c060 100644 --- a/server/AyaNova/biz/QuoteBiz.cs +++ b/server/AyaNova/biz/QuoteBiz.cs @@ -584,7 +584,7 @@ namespace AyaNova.Biz //This may become necessary for v8migrate, leaving out for now //skip validation if seeding - //if (ServerBootConfig.SEEDING) return; + //if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -929,7 +929,7 @@ namespace AyaNova.Biz public async Task QuoteHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -1066,7 +1066,7 @@ namespace AyaNova.Biz // { // ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; // log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); // bool isNew = currentObj == null; @@ -1591,7 +1591,7 @@ namespace AyaNova.Biz public async Task ItemHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -1817,7 +1817,7 @@ namespace AyaNova.Biz private async Task ExpenseValidateAsync(QuoteItemExpense proposedObj, QuoteItemExpense currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -1957,7 +1957,7 @@ namespace AyaNova.Biz public async Task ExpenseHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2250,7 +2250,7 @@ namespace AyaNova.Biz private async Task LaborValidateAsync(QuoteItemLabor proposedObj, QuoteItemLabor currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2351,7 +2351,7 @@ namespace AyaNova.Biz public async Task LaborHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2657,7 +2657,7 @@ namespace AyaNova.Biz private async Task LoanValidateAsync(QuoteItemLoan proposedObj, QuoteItemLoan currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2746,7 +2746,7 @@ namespace AyaNova.Biz public async Task LoanHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2972,7 +2972,7 @@ namespace AyaNova.Biz private async Task OutsideServiceValidateAsync(QuoteItemOutsideService proposedObj, QuoteItemOutsideService currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3060,7 +3060,7 @@ namespace AyaNova.Biz OutsideServiceReceived = 17,//* Workorder object , WorkorderItemOutsideService updated, instant notification when item received, tag filterable */ ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3422,7 +3422,7 @@ namespace AyaNova.Biz private async Task PartValidateAsync(QuoteItemPart proposedObj, QuoteItemPart currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3511,7 +3511,7 @@ namespace AyaNova.Biz public async Task PartHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3662,7 +3662,7 @@ namespace AyaNova.Biz private async Task ScheduledUserValidateAsync(QuoteItemScheduledUser proposedObj, QuoteItemScheduledUser currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3759,7 +3759,7 @@ namespace AyaNova.Biz public async Task ScheduledUserHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3936,7 +3936,7 @@ namespace AyaNova.Biz private async Task TaskValidateAsync(QuoteItemTask proposedObj, QuoteItemTask currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4030,7 +4030,7 @@ namespace AyaNova.Biz public async Task TaskHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4314,7 +4314,7 @@ namespace AyaNova.Biz private async Task TravelValidateAsync(QuoteItemTravel proposedObj, QuoteItemTravel currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4402,7 +4402,7 @@ namespace AyaNova.Biz public async Task TravelHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4610,7 +4610,7 @@ namespace AyaNova.Biz private async Task UnitValidateAsync(QuoteItemUnit proposedObj, QuoteItemUnit currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4693,7 +4693,7 @@ namespace AyaNova.Biz public async Task UnitHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/ReminderBiz.cs b/server/AyaNova/biz/ReminderBiz.cs index 864cb0c2..9db6a951 100644 --- a/server/AyaNova/biz/ReminderBiz.cs +++ b/server/AyaNova/biz/ReminderBiz.cs @@ -422,7 +422,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/ReviewBiz.cs b/server/AyaNova/biz/ReviewBiz.cs index 022cc4cb..15b773f4 100644 --- a/server/AyaNova/biz/ReviewBiz.cs +++ b/server/AyaNova/biz/ReviewBiz.cs @@ -481,7 +481,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/ServiceBankBiz.cs b/server/AyaNova/biz/ServiceBankBiz.cs index e4cfd912..a25eb4dd 100644 --- a/server/AyaNova/biz/ServiceBankBiz.cs +++ b/server/AyaNova/biz/ServiceBankBiz.cs @@ -305,7 +305,7 @@ // public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) // { // ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); -// if (ServerBootConfig.SEEDING) return; +// if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; // log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); // bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/ServiceRateBiz.cs b/server/AyaNova/biz/ServiceRateBiz.cs index c35f6b2b..d77ad5b0 100644 --- a/server/AyaNova/biz/ServiceRateBiz.cs +++ b/server/AyaNova/biz/ServiceRateBiz.cs @@ -452,7 +452,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/TaskGroupBiz.cs b/server/AyaNova/biz/TaskGroupBiz.cs index d4ae3ac4..108fb4f0 100644 --- a/server/AyaNova/biz/TaskGroupBiz.cs +++ b/server/AyaNova/biz/TaskGroupBiz.cs @@ -433,7 +433,7 @@ namespace AyaNova.Biz // public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) // { // ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; // log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); // bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/TaxCodeBiz.cs b/server/AyaNova/biz/TaxCodeBiz.cs index b460f213..4e432dff 100644 --- a/server/AyaNova/biz/TaxCodeBiz.cs +++ b/server/AyaNova/biz/TaxCodeBiz.cs @@ -483,7 +483,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/TravelRateBiz.cs b/server/AyaNova/biz/TravelRateBiz.cs index 5b1af5df..7d8e5e72 100644 --- a/server/AyaNova/biz/TravelRateBiz.cs +++ b/server/AyaNova/biz/TravelRateBiz.cs @@ -448,7 +448,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/UnitBiz.cs b/server/AyaNova/biz/UnitBiz.cs index bdc3e45a..1431c76f 100644 --- a/server/AyaNova/biz/UnitBiz.cs +++ b/server/AyaNova/biz/UnitBiz.cs @@ -467,7 +467,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/UnitModelBiz.cs b/server/AyaNova/biz/UnitModelBiz.cs index c3e14f84..fa95546c 100644 --- a/server/AyaNova/biz/UnitModelBiz.cs +++ b/server/AyaNova/biz/UnitModelBiz.cs @@ -430,7 +430,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 18a35ed4..96f7e6bc 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -737,7 +737,7 @@ namespace AyaNova.Biz private async Task ValidateAsync(User proposedObj, User currentObj) { //skip validation if seeding - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -1174,7 +1174,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/VendorBiz.cs b/server/AyaNova/biz/VendorBiz.cs index cab943c5..0dc6e002 100644 --- a/server/AyaNova/biz/VendorBiz.cs +++ b/server/AyaNova/biz/VendorBiz.cs @@ -239,7 +239,7 @@ namespace AyaNova.Biz { //skip validation if seeding - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING) return; bool isNew = currentObj == null; @@ -465,7 +465,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/WidgetBiz.cs b/server/AyaNova/biz/WidgetBiz.cs index 8447e504..0ff479e6 100644 --- a/server/AyaNova/biz/WidgetBiz.cs +++ b/server/AyaNova/biz/WidgetBiz.cs @@ -281,7 +281,7 @@ namespace AyaNova.Biz private async Task ValidateAsync(Widget proposedObj) { //skip validation if seeding - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING) return; //NOTE: In DB schema only name and serial are not nullable @@ -526,7 +526,7 @@ namespace AyaNova.Biz public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/biz/WorkOrderBiz.cs b/server/AyaNova/biz/WorkOrderBiz.cs index 651dc7ab..1d07490f 100644 --- a/server/AyaNova/biz/WorkOrderBiz.cs +++ b/server/AyaNova/biz/WorkOrderBiz.cs @@ -695,7 +695,7 @@ namespace AyaNova.Biz //This may become necessary for v8migrate, leaving out for now //skip validation if seeding - //if (ServerBootConfig.SEEDING) return; + //if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -1033,7 +1033,7 @@ namespace AyaNova.Biz public async Task WorkOrderHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{this.BizType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; WorkOrder oProposed = (WorkOrder)proposedObj; @@ -1443,7 +1443,7 @@ namespace AyaNova.Biz { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2009,7 +2009,7 @@ namespace AyaNova.Biz public async Task ItemHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2232,7 +2232,7 @@ namespace AyaNova.Biz private async Task ExpenseValidateAsync(WorkOrderItemExpense proposedObj, WorkOrderItemExpense currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2367,7 +2367,7 @@ namespace AyaNova.Biz public async Task ExpenseHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -2647,7 +2647,7 @@ namespace AyaNova.Biz private async Task LaborValidateAsync(WorkOrderItemLabor proposedObj, WorkOrderItemLabor currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -2743,7 +2743,7 @@ namespace AyaNova.Biz public async Task LaborHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3087,7 +3087,7 @@ namespace AyaNova.Biz private async Task LoanValidateAsync(WorkOrderItemLoan proposedObj, WorkOrderItemLoan currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3170,7 +3170,7 @@ namespace AyaNova.Biz public async Task LoanHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -3394,7 +3394,7 @@ namespace AyaNova.Biz private async Task OutsideServiceValidateAsync(WorkOrderItemOutsideService proposedObj, WorkOrderItemOutsideService currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -3482,7 +3482,7 @@ namespace AyaNova.Biz OutsideServiceReceived = 17,//* Workorder object , WorkorderItemOutsideService updated, instant notification when item received, tag filterable */ ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4134,7 +4134,7 @@ namespace AyaNova.Biz private async Task PartValidateAsync(WorkOrderItemPart proposedObj, WorkOrderItemPart currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4223,7 +4223,7 @@ namespace AyaNova.Biz public async Task PartHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4386,7 +4386,7 @@ namespace AyaNova.Biz private async Task PartRequestValidateAsync(WorkOrderItemPartRequest proposedObj, WorkOrderItemPartRequest currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4472,7 +4472,7 @@ namespace AyaNova.Biz public async Task PartRequestHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -4622,7 +4622,7 @@ namespace AyaNova.Biz private async Task ScheduledUserValidateAsync(WorkOrderItemScheduledUser proposedObj, WorkOrderItemScheduledUser currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -4739,7 +4739,7 @@ namespace AyaNova.Biz public async Task ScheduledUserHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -5029,7 +5029,7 @@ namespace AyaNova.Biz private async Task TaskValidateAsync(WorkOrderItemTask proposedObj, WorkOrderItemTask currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -5122,7 +5122,7 @@ namespace AyaNova.Biz public async Task TaskHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -5404,7 +5404,7 @@ namespace AyaNova.Biz private async Task TravelValidateAsync(WorkOrderItemTravel proposedObj, WorkOrderItemTravel currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -5490,7 +5490,7 @@ namespace AyaNova.Biz public async Task TravelHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; @@ -5692,7 +5692,7 @@ namespace AyaNova.Biz private async Task UnitValidateAsync(WorkOrderItemUnit proposedObj, WorkOrderItemUnit currentObj) { //skip validation if seeding - // if (ServerBootConfig.SEEDING) return; + // if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; //run validation and biz rules bool isNew = currentObj == null; @@ -5773,7 +5773,7 @@ namespace AyaNova.Biz public async Task UnitHandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null) { ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger(); - if (ServerBootConfig.SEEDING) return; + if(ServerBootConfig.SEEDING || ServerBootConfig.MIGRATING) return; log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{proposedObj.AyaType}, AyaEvent:{ayaEvent}]"); bool isNew = currentObj == null; diff --git a/server/AyaNova/util/ServerBootConfig.cs b/server/AyaNova/util/ServerBootConfig.cs index af85686e..0fe8bfc2 100644 --- a/server/AyaNova/util/ServerBootConfig.cs +++ b/server/AyaNova/util/ServerBootConfig.cs @@ -27,6 +27,12 @@ namespace AyaNova.Util //SEEDING FLAG INTERNAL ONLY //used to speed up seeding with bypasses to normal validation etc internal static bool SEEDING { get; set; } + //############################ + + //############################ + //MIGRATING FLAG INTERNAL ONLY + //used to speed up v8 migration with bypasses to notification processing + internal static bool MIGRATING { get; set; } //############################ //Diagnostic static values used during development, may not be related to config at all, this is just a convenient class to put them in