From cb32471d4f54b23e402c7734eca9ef2570c7e302 Mon Sep 17 00:00:00 2001
From: lingling <kety1122@163.com>
Date: 星期五, 21 三月 2025 16:30:09 +0800
Subject: [PATCH] 修改worker
---
LifePayment/LifePayment.Worker/appsettings.json | 20 ++++++++++++++++++--
LifePayment/LifePayment.Worker/Worker/GetStaticsWorker.cs | 10 +++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/LifePayment/LifePayment.Worker/Worker/GetStaticsWorker.cs b/LifePayment/LifePayment.Worker/Worker/GetStaticsWorker.cs
index d0e6ef7..4059589 100644
--- a/LifePayment/LifePayment.Worker/Worker/GetStaticsWorker.cs
+++ b/LifePayment/LifePayment.Worker/Worker/GetStaticsWorker.cs
@@ -16,14 +16,14 @@
{
public class GetStaticsWorker : AsyncPeriodicBackgroundWorkerBase
{
- private readonly ILifePayService _lifePayService;
+ private readonly IStatisticsService _statisticService;
private readonly int _doWorkHour = 0;
private readonly int _doWorkMinute = 30;
- public GetStaticsWorker(AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory, ILifePayService lifePayService) : base(timer, serviceScopeFactory)
+ public GetStaticsWorker(AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory, IStatisticsService statisticService) : base(timer, serviceScopeFactory)
{
- _lifePayService = lifePayService;
+ _statisticService = statisticService;
timer.Period = PeriodTool.CalcuPeriodFromEveryDayTime(_doWorkHour, _doWorkMinute, 0);
- //timer.Period =5 * 60000;
+ //timer.Period =1 * 60000;
}
[UnitOfWork]
@@ -31,7 +31,7 @@
{
try
{
- await _lifePayService.GetTopStatistics();
+ await _statisticService.GetTopStatistics();
Logger.LogError($"鑾峰彇缁熻淇℃伅寮�濮�: {DateTime.Now}");
}
catch (Exception ex)
diff --git a/LifePayment/LifePayment.Worker/appsettings.json b/LifePayment/LifePayment.Worker/appsettings.json
index 6a600f9..93c551b 100644
--- a/LifePayment/LifePayment.Worker/appsettings.json
+++ b/LifePayment/LifePayment.Worker/appsettings.json
@@ -21,10 +21,12 @@
"CorsOrigins": "http://localhost:31804"
},
"ElasticSearch": {
- "Url": "http://localhost:9200"
+ "Url": "http://106.12.151.86:19200",
+ "UserName": "elastic",
+ "PassWord": "bole5201314"
},
"Redis": {
- "Configuration": "localhost:6379"
+ "Configuration": "118.178.252.28:5390,defaultDatabase=5,password=Bole123!"
},
"AliYunSMSSetting": {
"AliYunSmsAccessId": "LTAI4G5qXfYeS14JxEeN9JxF",
@@ -44,6 +46,20 @@
"CheckPath": false,
"AppName": "C绔鎴风"
},
+ "RabbitMQ": {
+ "Connections": {
+ "Default": {
+ "HostName": "118.178.252.28",
+ "UserName": "admin",
+ "Password": "Bole12345678",
+ "Port": "5673"
+ }
+ },
+ "EventBus": {
+ "ClientName": "MsDemo_LifePaymentService_Development_Ling1122",
+ "ExchangeName": "MsDemo_Development_Ling1122"
+ }
+ },
"InitSetting": {
"SelfSupportingServiceName": "澹硅窗鍙佸弫鍙佷俊鎭妧鏈�",
"PlatServicePhone": "13005741111",
--
Gitblit v1.9.1