This commit is contained in:
2020-12-04 20:49:05 +00:00
parent 55433a8ace
commit cd016efbfb
12 changed files with 89 additions and 58 deletions

View File

@@ -136,6 +136,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;
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;
@@ -144,9 +145,9 @@ namespace AyaNova.Biz
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
//short circuit if there are no subscriptions which would be typical of a v8 migrate scenario or fresh import or just not using notification
if(!await ct.NotifySubscription.AnyAsync())
if (!await ct.NotifySubscription.AnyAsync())
return;
//switch through AyaEvent then individual Ayatypes as required for event types
switch (ayaEvent)
{