This commit is contained in:
2020-11-27 19:32:32 +00:00
parent 945de40c16
commit 54b9455e74
2 changed files with 12 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ namespace AyaNova
{
var nlogLoggerProvider = new NLogLoggerProvider();
_newLog = nlogLoggerProvider.CreateLogger("SERVER");
_hostingEnvironment = hostingEnvironment;
_hostingEnvironment = hostingEnvironment;
AyaNova.Util.ApplicationLogging.LoggerProvider = nlogLoggerProvider;
ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH = hostingEnvironment.ContentRootPath;
}
@@ -43,7 +43,7 @@ namespace AyaNova
private string _connectionString = "";
private readonly Microsoft.AspNetCore.Hosting.IWebHostEnvironment _hostingEnvironment;
////////////////////////////////////////////////////////////
//
@@ -119,8 +119,8 @@ namespace AyaNova
_newLog.LogDebug("Ensuring user and backup folders exist and are separate locations...");
FileUtil.EnsureUserAndUtilityFoldersExistAndAreNotIdentical(_hostingEnvironment.ContentRootPath);
//TODO: ENsure report files here
//TODO: ENsure report files here
#region DATABASE
@@ -464,9 +464,9 @@ namespace AyaNova
context.Request.HttpContext.Items["AY_TRANSLATION_ID"] = u.translationId;
//Is import mode header set?
context.Request.HttpContext.Items["AY_IMPORT_MODE"]= context.Request.Headers.ContainsKey("X-AY-Import-Mode");
if (context.Request.Headers.ContainsKey("X-AY-Import-Mode"))
context.Request.HttpContext.Items["AY_IMPORT_MODE"] = true;
//CHECK JWT
if (
@@ -639,7 +639,7 @@ namespace AyaNova
_newLog.LogInformation("Boot complete - server open");
//flag in console that server is open
Console.WriteLine("BOOT: COMPLETED - SERVER IS NOW OPEN");
Console.WriteLine("BOOT: COMPLETED - SERVER IS NOW OPEN");
Console.WriteLine("(ctrl-c here will force stop AyaNova server. Controlled shut down via AyaNova APP Operations ServerState page)");
}

View File

@@ -55,7 +55,10 @@ namespace AyaNova.Biz
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
await SearchIndexAsync(newObject, true);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
await NotifyEventProcessor.HandlePotentialNotificationEvent(AyaEvent.Created, newObject);
if (!ImportMode)
await NotifyEventProcessor.HandlePotentialNotificationEvent(AyaEvent.Created, newObject);
else
newObject.TechNotes+="*";
return newObject;
}
}