Skip to content

Commit

Permalink
v6.0.0-beta.8
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org committed Nov 22, 2024
1 parent ffd689a commit 584814b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Midjourney.API/DiscordAccountInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
using Microsoft.Extensions.Options;
using Midjourney.Infrastructure.Data;
using Midjourney.Infrastructure.LoadBalancer;
using Midjourney.Infrastructure.Models;
using Midjourney.Infrastructure.Services;
using Midjourney.Infrastructure.Util;
using MongoDB.Driver;
Expand Down Expand Up @@ -174,7 +175,12 @@ public async Task StartAsync(CancellationToken cancellationToken)
}
catch (Exception ex)
{
_logger.Error(ex, "本地存储迁移到 mongodb 异常");
_logger.Error(ex, "本地存储迁移到 mongodb 异常,已重置为本地数据库");

// 如果出现异常,则重置为本地存储
GlobalConfiguration.Setting.MongoDefaultConnectionString = "";

LiteDBHelper.SettingStore.Save(GlobalConfiguration.Setting);
}
}

Expand Down

0 comments on commit 584814b

Please sign in to comment.