Add trap logging, dashboard, EF migrations and Dockerfile
This commit is contained in:
1 parent
f9161f48e7
commit
b561924efa
26 files changed
+784
-62
No files matched your search
@@ -12,6 +12,14 @@ public static class FlypaperStorageExtensions
|
||||
services.AddSingleton<ChannelTrapEventSink>();
|
||||
services.AddSingleton<ITrapEventSink>(sp => sp.GetRequiredService<ChannelTrapEventSink>());
|
||||
services.AddHostedService<TrapEventWriter>();
|
||||
services.AddSingleton<DashboardQueries>();
|
||||
return services;
|
||||
}
|
||||
|
||||
public static async Task MigrateFlypaperDatabaseAsync(this IServiceProvider services, CancellationToken ct = default)
|
||||
{
|
||||
var factory = services.GetRequiredService<IDbContextFactory<FlypaperDbContext>>();
|
||||
await using var db = await factory.CreateDbContextAsync(ct);
|
||||
await db.Database.MigrateAsync(ct);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user