feat: 新增工作服务项目并调整部分接口路由
1. 新增QYZH.InteractiveMagazine.WorkService工作服务项目,包含队列消费者框架、Hangfire定时任务支持 2. 修复PetService中未定义FeedPetOutput变量的问题 3. 调整JournalController的路由前缀从api/icr改为api 4. 将工作服务项目添加到解决方案中
This commit is contained in:
48
QYZH.InteractiveMagazine.WorkService/appsettings.json
Normal file
48
QYZH.InteractiveMagazine.WorkService/appsettings.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "server=192.168.20.150;port=13306;database=InteractiveMagazine;user=user;password=n68792bu!y99r905;charset=utf8mb4;"
|
||||
},
|
||||
"RabbitMq": {
|
||||
"HostName": "192.168.20.150",
|
||||
"Port": 5672,
|
||||
"UserName": "smartschool",
|
||||
"Password": "@ss%&*otz%d*pq2S",
|
||||
"VirtualHost": "InteractiveMagazine"
|
||||
},
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
"Override": {
|
||||
"Microsoft": "Warning",
|
||||
"System": "Warning",
|
||||
"Hangfire": "Information"
|
||||
}
|
||||
},
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "Console"
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "logs/worker-log-.txt",
|
||||
"rollingInterval": "Day"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"HangfireJobs": {
|
||||
"_说明": "定时任务配置。新增任务只需在 Jobs 数组中追加一项。Cron格式:分 时 日 月 星期(5位)。常用:* * * * * 每分钟 | */5 * * * * 每5分钟 | 0 * * * * 每小时 | 0 9 * * * 每天9点 | 0 0 * * 1 每周一午夜",
|
||||
"Jobs": [
|
||||
{
|
||||
"Name": "sample-job",
|
||||
"JobType": "QYZH.InteractiveMagazine.WorkService.Jobs.SampleJob",
|
||||
"MethodName": "ExecuteAsync",
|
||||
"Cron": "* * * * *",
|
||||
"Enabled": false,
|
||||
"Description": "示例任务(默认关闭,仅用于验证框架运行)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Reference in New Issue
Block a user