feat: add LiteDB => Sqlite importer

This commit is contained in:
Dean Sheather
2024-04-22 02:43:48 +10:00
parent c152f3dfde
commit fcdb5625f3
11 changed files with 816 additions and 14 deletions
-8
View File
@@ -19,7 +19,6 @@ internal class MessageManager : IDisposable
internal MessageStore Store { get; }
private ConcurrentQueue<(uint, Message)> Pending { get; } = new();
private Stopwatch MaintenanceTimer { get; } = new();
private Dictionary<ChatType, NameFormatting> Formats { get; } = new();
private ulong LastContentId { get; set; }
@@ -35,7 +34,6 @@ internal class MessageManager : IDisposable
internal MessageManager(Plugin plugin)
{
Plugin = plugin;
MaintenanceTimer.Start();
Store = new MessageStore(DatabasePath());
Plugin.ChatGui.ChatMessageUnhandled += ChatMessage;
@@ -73,12 +71,6 @@ internal class MessageManager : IDisposable
private void GetMessageInfo(IFramework framework)
{
if (MaintenanceTimer.Elapsed > TimeSpan.FromMinutes(5))
{
MaintenanceTimer.Restart();
new Thread(() => Store.PerformMaintenance()).Start();
}
if (!Pending.TryDequeue(out var entry))
return;