fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 3s

This commit is contained in:
SunCheng
2026-01-30 10:41:19 +08:00
parent d9703d31ae
commit 704f58b1a1
46 changed files with 6074 additions and 301 deletions

View File

@@ -24,7 +24,7 @@ public class BudgetArchiveJob(
using var scope = serviceProvider.CreateScope();
var budgetService = scope.ServiceProvider.GetRequiredService<IBudgetService>();
// 归档月度数据
var result = await budgetService.ArchiveBudgetsAsync(year, month);

View File

@@ -15,7 +15,7 @@ public class DbBackupJob(
try
{
logger.LogInformation("开始执行数据库备份任务");
// 数据库文件路径 (基于 appsettings.json 中的配置: database/EmailBill.db)
var dbPath = Path.Combine(env.ContentRootPath, "database", "EmailBill.db");
var backupDir = Path.Combine(env.ContentRootPath, "database", "backups");
@@ -48,7 +48,7 @@ public class DbBackupJob(
var filesToDelete = files.Skip(20);
foreach (var file in filesToDelete)
{
try
try
{
file.Delete();
logger.LogInformation("删除过期备份: {Name}", file.Name);

View File

@@ -144,12 +144,12 @@ public class EmailSyncJob(
message.TextBody ?? message.HtmlBody ?? string.Empty
) || (DateTime.Now - message.Date.DateTime > TimeSpan.FromDays(3)))
{
#if DEBUG
#if DEBUG
logger.LogDebug("DEBUG 模式下,跳过标记已读步骤");
#else
#else
// 标记邮件为已读
await emailFetchService.MarkAsReadAsync(uid);
#endif
#endif
}
}
catch (Exception ex)