|
|
|
@ -34,6 +34,13 @@ namespace UMC.Host
|
|
|
|
|
{
|
|
|
|
|
switch (variable)
|
|
|
|
|
{
|
|
|
|
|
case "restart":
|
|
|
|
|
System.Threading.Thread.Sleep(1000);
|
|
|
|
|
if (IsRun() == false)
|
|
|
|
|
{
|
|
|
|
|
StartUp(args.Length == 2 ? args[1] : String.Empty);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
case "start":
|
|
|
|
|
if (IsRun() == false)
|
|
|
|
|
{
|
|
|
|
@ -293,8 +300,12 @@ namespace UMC.Host
|
|
|
|
|
private static void UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
UMC.Data.Utility.Error("Unhandled", DateTime.Now, $"{e.ExceptionObject}");
|
|
|
|
|
|
|
|
|
|
if (IsRestart)
|
|
|
|
|
{
|
|
|
|
|
Excel("restart");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static bool IsRestart;
|
|
|
|
|
static void ConfigDbProvider()
|
|
|
|
|
{
|
|
|
|
|
var urlKey = RuntimeInformation.RuntimeIdentifier;
|
|
|
|
@ -441,6 +452,7 @@ namespace UMC.Host
|
|
|
|
|
}
|
|
|
|
|
static void StartUp(string path)
|
|
|
|
|
{
|
|
|
|
|
IsRestart = true;
|
|
|
|
|
Register();
|
|
|
|
|
if (String.IsNullOrEmpty(path) == false)
|
|
|
|
|
{
|
|
|
|
@ -449,7 +461,6 @@ namespace UMC.Host
|
|
|
|
|
|
|
|
|
|
File.WriteAllText(UMC.Data.Utility.MapPath($".lock"), $"{{\"Id\":\"{System.Diagnostics.Process.GetCurrentProcess().Id}\"}}");
|
|
|
|
|
|
|
|
|
|
// HotCache.Namespace("UMC.Proxy.Entities");
|
|
|
|
|
UMC.Activities.DataFactory.Instance();
|
|
|
|
|
UMC.Proxy.DataFactory.Instance();
|
|
|
|
|
UMC.Data.DataFactory.Instance();
|
|
|
|
|