定时任务修改;海运出口添加服务项目
parent
395ff4862f
commit
76b05e5879
@ -1,6 +0,0 @@
|
|||||||
@DS.WMS.JobServiceApi_HostAddress = http://localhost:5063
|
|
||||||
|
|
||||||
GET {{DS.WMS.JobServiceApi_HostAddress}}/weatherforecast/
|
|
||||||
Accept: application/json
|
|
||||||
|
|
||||||
###
|
|
@ -1,46 +0,0 @@
|
|||||||
using Autofac;
|
|
||||||
using Autofac.Extensions.DependencyInjection;
|
|
||||||
using DS.Module.AutofacModule;
|
|
||||||
using DS.Module.HangfireModule;
|
|
||||||
using DS.Module.RedisModule;
|
|
||||||
using DS.Module.SqlSugar;
|
|
||||||
using DS.Module.UserModule;
|
|
||||||
using DS.WMS.JobServiceApi;
|
|
||||||
using NLog.Web;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
|
||||||
//注册配置
|
|
||||||
builder.Configuration
|
|
||||||
.AddJsonFile(path: "appsettings.json", optional: false, reloadOnChange: true)
|
|
||||||
.Build();
|
|
||||||
builder.Configuration.AddEnvironmentVariables();
|
|
||||||
builder.Logging.AddNLog("nlog.config");
|
|
||||||
// Add services to the container.
|
|
||||||
//Autofac注入
|
|
||||||
builder.Host
|
|
||||||
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
|
|
||||||
.ConfigureContainer<ContainerBuilder>(builder => { builder.RegisterModule(new AutofacModuleRegister()); });
|
|
||||||
|
|
||||||
builder.Services.AddUserModuleInstall(); //用户服务
|
|
||||||
builder.Services.AddRedisModuleInstall();//redis
|
|
||||||
builder.Services.AddSqlSugarInstall();
|
|
||||||
builder.Services.AddSaasDbInstall();//分库服务
|
|
||||||
builder.Services.AddWorkServiceHangfireModuleInstall();//Hangfire服务
|
|
||||||
//允许 BackgroundService 中存在未经处理的异常,不停止主机
|
|
||||||
builder.Services.Configure<HostOptions>(hostOptions =>
|
|
||||||
{
|
|
||||||
hostOptions.BackgroundServiceExceptionBehavior = BackgroundServiceExceptionBehavior.Ignore;
|
|
||||||
}); //应用作为 Windows 服务
|
|
||||||
builder.Services.AddWindowsService();
|
|
||||||
|
|
||||||
var app = builder.Build();
|
|
||||||
|
|
||||||
//app.UseHangfireMiddleware();
|
|
||||||
|
|
||||||
|
|
||||||
//异常中间件
|
|
||||||
app.UseMiddleware<ExceptionHandlingMiddleware>();
|
|
||||||
|
|
||||||
//app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
|
|
||||||
|
|
||||||
app.Run();
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"DBInfo": {
|
|
||||||
"DefaultDbConnId": "1288018625843826688",
|
|
||||||
"DefaultDbType": 0,
|
|
||||||
"DefaultDbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_dev",
|
|
||||||
"DBS": [
|
|
||||||
{
|
|
||||||
"ConnId": "1288018625843826680",
|
|
||||||
"DBType": 0,
|
|
||||||
"Enabled": false,
|
|
||||||
"HitRate": 40,
|
|
||||||
"Connection": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_log"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
"HangfireSettings": {
|
|
||||||
"DbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_hangfire;Allow User Variables=true",
|
|
||||||
"WorkerCount": 10,
|
|
||||||
"ServerName": "WorkService",
|
|
||||||
"Queues": "op"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue