Optimize action log flushing

This commit is contained in:
2025-05-18 12:00:05 +08:00
parent c597df3937
commit fdfdffa382
5 changed files with 95 additions and 37 deletions

View File

@ -18,6 +18,7 @@ using DysonNetwork.Sphere.Publisher;
using DysonNetwork.Sphere.Realm;
using DysonNetwork.Sphere.Sticker;
using DysonNetwork.Sphere.Storage;
using DysonNetwork.Sphere.Storage.Handlers;
using DysonNetwork.Sphere.Wallet;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Mvc;
@ -135,6 +136,10 @@ var tusDiskStore = new TusDiskStore(
);
builder.Services.AddSingleton(tusDiskStore);
builder.Services.AddSingleton<FlushBufferService>();
builder.Services.AddScoped<ActionLogFlushHandler>();
builder.Services.AddScoped<ActionLogService>();
// The handlers for websocket
builder.Services.AddScoped<IWebSocketPacketHandler, MessageReadHandler>();
builder.Services.AddScoped<IWebSocketPacketHandler, MessageTypingHandler>();