ClearEvents: fixed log and launch

This commit is contained in:
pavelbannov 2021-06-23 15:25:17 +03:00
parent 00cc15fbf5
commit c18adc50dc
3 changed files with 3 additions and 13 deletions

View File

@ -26,8 +26,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
@ -35,7 +33,6 @@ using System.Threading.Tasks;
using ASC.Common;
using ASC.Common.Logging;
using ASC.Common.Utils;
using ASC.Core.Common.EF;
using ASC.Core.Common.EF.Context;
using ASC.Core.Common.EF.Model;

View File

@ -26,7 +26,6 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using ASC.Common;
@ -71,12 +70,6 @@ namespace ASC.Thumbnails.Svc
var env = hostContext.Configuration.GetValue("ENVIRONMENT", "Production");
config
.AddJsonFile("appsettings.json")
.AddJsonFile("storage.json")
.AddJsonFile("kafka.json")
.AddJsonFile("thumb.json")
.AddJsonFile($"kafka.{env}.json", true)
.AddJsonFile($"appsettings.{env}.json", true)
.AddJsonFile($"thumb.{env}.json", true)
.AddEnvironmentVariables()
.AddCommandLine(args)
.AddInMemoryCollection(new Dictionary<string, string>
@ -91,7 +84,7 @@ namespace ASC.Thumbnails.Svc
var diHelper = new DIHelper(services);
diHelper.TryAdd(typeof(ICacheNotify<>), typeof(KafkaCache<>));
LogNLogExtension.ConfigureLog(diHelper, "ASC.Thumbnails.Svc");
LogNLogExtension.ConfigureLog(diHelper, "ASC.ClearEvents");
services.AddHostedService<ClearEventsServiceLauncher>();
diHelper.TryAdd<ClearEventsServiceLauncher>();
})

View File

@ -8,7 +8,7 @@
"log__name": "clearEvents",
"log__dir": "../../../Logs",
"core__products__folder": "../../../products",
"ASPNETCORE_URLS": "http://localhost:8561",
"ASPNETCORE_URLS": "http://localhost:5027",
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
@ -20,7 +20,7 @@
"log__name": "clearEvents",
"log__dir": "../../../Logs",
"core__products__folder": "../../../products",
"ASPNETCORE_URLS": "http://localhost:8561",
"ASPNETCORE_URLS": "http://localhost:5027",
"ASPNETCORE_ENVIRONMENT": "Development"
},
"distributionName": "Ubuntu-20.04"