From 9e143c0a75ace777127cee45ec9d99befa19e04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Fri, 7 Feb 2025 16:06:46 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9job=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Yi.Framework.Bbs.Application/Jobs/AccessLogCacheJob.cs | 4 ++-- .../Yi.Framework.Bbs.Application/Jobs/AccessLogStoreJob.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogCacheJob.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogCacheJob.cs index 63b3b4d0..ea1cce02 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogCacheJob.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogCacheJob.cs @@ -23,8 +23,8 @@ public class AccessLogCacheJob : HangfireBackgroundWorkerBase { _localEventBus = localEventBus; RecurringJobId = "访问日志写入缓存"; - //每10秒执行一次,将本地缓存转入redis,防止丢数据 - CronExpression = "*/10 * * * * *"; + //每分钟执行一次,将本地缓存转入redis,防止丢数据 + CronExpression = "0 * * * * ?"; // // JobDetail = JobBuilder.Create().WithIdentity(nameof(AccessLogCacheJob)) // .Build(); diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogStoreJob.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogStoreJob.cs index 8fb30491..4a64d011 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogStoreJob.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Jobs/AccessLogStoreJob.cs @@ -46,8 +46,8 @@ public class AccessLogStoreJob : HangfireBackgroundWorkerBase RecurringJobId = "访问日志写入数据库"; - //每分钟执行一次 - CronExpression = "0 * * * * ?"; + //每小时执行一次 + CronExpression = "0 0 * * * ?"; // JobDetail = JobBuilder.Create().WithIdentity(nameof(AccessLogStoreJob)) // .Build(); // //每分钟执行一次