This commit is contained in:
@@ -42,7 +42,7 @@ namespace AyaNova.Biz
|
|||||||
//optional user id to send directly to them
|
//optional user id to send directly to them
|
||||||
internal static async Task AddGeneralNotifyEvent(NotifyEventType eventType, string message, string name, Exception except = null, long userId = 0)
|
internal static async Task AddGeneralNotifyEvent(NotifyEventType eventType, string message, string name, Exception except = null, long userId = 0)
|
||||||
{
|
{
|
||||||
log.LogTrace($"AddGeneralNotifyEvent processing: [type:{eventType}, userId:{userId}, message:{message}]");
|
log.LogDebug($"AddGeneralNotifyEvent processing: [type:{eventType}, userId:{userId}, message:{message}]");
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
switch (eventType)
|
switch (eventType)
|
||||||
{
|
{
|
||||||
@@ -134,7 +134,7 @@ namespace AyaNova.Biz
|
|||||||
//will iterate the subscriptions and see if any apply here
|
//will iterate the subscriptions and see if any apply here
|
||||||
internal static async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel newObject, ICoreBizObjectModel originalObject = null)
|
internal static async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel newObject, ICoreBizObjectModel originalObject = null)
|
||||||
{
|
{
|
||||||
log.LogTrace($"HandlePotentialNotificationEvent processing: [AyaType:{newObject.AyaType}, AyaEvent:{ayaEvent}]");
|
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{newObject.AyaType}, AyaEvent:{ayaEvent}]");
|
||||||
//set to true if any changes are made to the context (NotifyEvent added)
|
//set to true if any changes are made to the context (NotifyEvent added)
|
||||||
bool SaveContext = false;
|
bool SaveContext = false;
|
||||||
try
|
try
|
||||||
@@ -175,7 +175,7 @@ namespace AyaNova.Biz
|
|||||||
Name = newObject.Name
|
Name = newObject.Name
|
||||||
};
|
};
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
|
|
||||||
//Note: in same event but for MODIFY below if need to delete old notifyevent here
|
//Note: in same event but for MODIFY below if need to delete old notifyevent here
|
||||||
// var deleteEventList = await ct.NotifyEvent.Where(z => z.ObjectId == ev.ObjectId && z.AyaType == ev.AyaType).ToListAsync();
|
// var deleteEventList = await ct.NotifyEvent.Where(z => z.ObjectId == ev.ObjectId && z.AyaType == ev.AyaType).ToListAsync();
|
||||||
@@ -241,7 +241,7 @@ namespace AyaNova.Biz
|
|||||||
Name = newObject.Name
|
Name = newObject.Name
|
||||||
};
|
};
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
SaveContext = true;
|
SaveContext = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ namespace AyaNova.Biz
|
|||||||
Name = newObject.Name
|
Name = newObject.Name
|
||||||
};
|
};
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
SaveContext = true;
|
SaveContext = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,7 +307,7 @@ namespace AyaNova.Biz
|
|||||||
// Name=newObject.Name
|
// Name=newObject.Name
|
||||||
// };
|
// };
|
||||||
// await ct.NotifyEvent.AddAsync(n);
|
// await ct.NotifyEvent.AddAsync(n);
|
||||||
// log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
|
// log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
|
|
||||||
// //Note: in same event but for MODIFY below if need to delete old notifyevent here
|
// //Note: in same event but for MODIFY below if need to delete old notifyevent here
|
||||||
// // var deleteEventList = await ct.NotifyEvent.Where(z => z.ObjectId == ev.ObjectId && z.AyaType == ev.AyaType).ToListAsync();
|
// // var deleteEventList = await ct.NotifyEvent.Where(z => z.ObjectId == ev.ObjectId && z.AyaType == ev.AyaType).ToListAsync();
|
||||||
@@ -412,7 +412,7 @@ namespace AyaNova.Biz
|
|||||||
Name = newObject.Name
|
Name = newObject.Name
|
||||||
};
|
};
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
SaveContext = true;
|
SaveContext = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -455,7 +455,7 @@ namespace AyaNova.Biz
|
|||||||
Name = newObject.Name
|
Name = newObject.Name
|
||||||
};
|
};
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
SaveContext = true;
|
SaveContext = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -481,7 +481,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
log.LogTrace($"Notify event processing completed");
|
log.LogDebug($"Notify event processing completed");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace AyaNova.Biz
|
|||||||
log.LogTrace("Checking if backup should run");
|
log.LogTrace("Checking if backup should run");
|
||||||
if (!ServerGlobalOpsSettingsCache.Backup.Active)
|
if (!ServerGlobalOpsSettingsCache.Backup.Active)
|
||||||
{
|
{
|
||||||
log.LogTrace("Automatic backup is set to INACTIVE - not backing up");
|
log.LogDebug("Automatic backup is set to INACTIVE - not backing up");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
if (ret != "notfound")
|
if (ret != "notfound")
|
||||||
{
|
{
|
||||||
//I'm thinking do not log internally failed except as trace event as this would fill up log file
|
//I'm thinking do not log internally failed except as debug event as this would fill up log file
|
||||||
//instead if they have a license issue they can do manual fetch and then that will log so they can see error
|
//instead if they have a license issue they can do manual fetch and then that will log so they can see error
|
||||||
//(also it will return an error to the client)
|
//(also it will return an error to the client)
|
||||||
log.LogDebug($"FetchLicense - failed: {ret}");
|
log.LogDebug($"FetchLicense - failed: {ret}");
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ namespace AyaNova.Biz
|
|||||||
//All items have an event date, for non time delayed events it's just the moment it was created
|
//All items have an event date, for non time delayed events it's just the moment it was created
|
||||||
//which will predate this moment now if it's pre-existing
|
//which will predate this moment now if it's pre-existing
|
||||||
var events = await ct.NotifyEvent.Include(z => z.NotifySubscription).ToListAsync();
|
var events = await ct.NotifyEvent.Include(z => z.NotifySubscription).ToListAsync();
|
||||||
log.LogTrace($"Found {events.Count} NotifyEvents to examine for potential delivery");
|
log.LogDebug($"Found {events.Count} NotifyEvents to examine for potential delivery");
|
||||||
|
|
||||||
//cache translations
|
//cache translations
|
||||||
//Get all subscription unique userId's that aren't inapp deliveries
|
//Get all subscription unique userId's that aren't inapp deliveries
|
||||||
|
|||||||
Reference in New Issue
Block a user