Handle shutdowns better, allow retrying multis

This commit is contained in:
2026-01-18 01:28:38 -06:00
parent 24a8613ea0
commit d7dec4b7e9
8 changed files with 117 additions and 10 deletions

View File

@@ -69,6 +69,7 @@
builder.Services.AddSingleton(sp => sp);
builder.Services.AddSingleton<AzureStorage>();
builder.Services.AddSingleton<CommonSettingsProcessor>();
builder.Services.AddSingleton<ShutdownHandler>();
builder.Services.AddKeyedScoped<IRandomizer, BaseRandomizer>(BaseRandomizer.Name);
builder.Services.AddKeyedScoped<IRandomizer, BaseRandomizer>(BaseRandomizer.DungeonMapName);
@@ -90,7 +91,11 @@
c.EnableValidator();
});
var sh = app.Services.GetService<ShutdownHandler>();
app.Run();
sh?.HandleShutdown().Wait();
}
}
}