This commit is contained in:
@@ -208,25 +208,25 @@ namespace AyaNova.Biz
|
||||
if (importCount > 0)
|
||||
{
|
||||
if (importTask != "main")
|
||||
{
|
||||
{
|
||||
JobsBiz.LogJob(jobId, $"Successfully ran import subtask {importTask} on {importCount.ToString()} of {zipObjectList.Count.ToString()} {entryStartsWith} objects", ct);
|
||||
}
|
||||
else
|
||||
{
|
||||
JobsBiz.LogJob(jobId, $"Successfully imported {importCount.ToString()} of {zipObjectList.Count.ToString()} {entryStartsWith} objects", ct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (notImportCount > 0)
|
||||
{
|
||||
if (importTask != "main")
|
||||
{
|
||||
JobsBiz.LogJob(jobId, $"Failed to run import subtask {importTask} on {notImportCount.ToString()} of {zipObjectList.Count.ToString()} {entryStartsWith} objects", ct);
|
||||
if (importTask != "main")
|
||||
{
|
||||
JobsBiz.LogJob(jobId, $"Failed to run import subtask {importTask} on {notImportCount.ToString()} of {zipObjectList.Count.ToString()} {entryStartsWith} objects", ct);
|
||||
}
|
||||
else
|
||||
{
|
||||
JobsBiz.LogJob(jobId, $"Did not import {notImportCount.ToString()} of {zipObjectList.Count.ToString()} {entryStartsWith} objects", ct);
|
||||
}
|
||||
JobsBiz.LogJob(jobId, $"Did not import {notImportCount.ToString()} of {zipObjectList.Count.ToString()} {entryStartsWith} objects", ct);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -235,6 +235,29 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//UTILITIES
|
||||
internal static async Task LogEventCreatedModifiedEvents(JObject j, List<ImportAyaNova7MapItem> importMap, AyaType ayaType, AyContext ct)
|
||||
{
|
||||
var V7Id = new Guid(j["ID"].Value<string>());
|
||||
var RavenId = importMap.Where(m => m.V7ObjectId == V7Id).First().NewObjectAyaTypeId.ObjectId;
|
||||
var Creator = importMap.Where(m => m.V7ObjectId == new Guid(j["Creator"].Value<string>())).First().NewObjectAyaTypeId.ObjectId;
|
||||
var Modifier = importMap.Where(m => m.V7ObjectId == new Guid(j["Modifier"].Value<string>())).First().NewObjectAyaTypeId.ObjectId;
|
||||
var Created = j["Created"].Value<DateTime>();
|
||||
var Modified = j["Modified"].Value<DateTime>();
|
||||
|
||||
//handle EventLog entries for users now that we have the user's created
|
||||
//Created
|
||||
EventLogProcessor.AddEntry(new Event(Creator, RavenId, ayaType, AyaEvent.Created, Created), ct);
|
||||
//MODIFIED
|
||||
EventLogProcessor.AddEntry(new Event(Modifier, RavenId, ayaType, AyaEvent.Modified, Modified), ct);
|
||||
await ct.SaveChangesAsync();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
}//eoc
|
||||
|
||||
Reference in New Issue
Block a user