Readd startup version log message

This commit is contained in:
Jordan Brown
2020-04-19 16:25:03 -04:00
parent b7cd27f7fa
commit 41f021c7b5
@@ -211,17 +211,19 @@ namespace Tgstation.Server.Host.Components
#pragma warning disable CA1506 // TODO: Decomplexify
public Task StartAsync(CancellationToken cancellationToken) => databaseContextFactory.UseContext(async databaseContext =>
{
logger.LogInformation(assemblyInformationProvider.VersionString);
try
{
var factoryStartup = instanceFactory.StartAsync(cancellationToken);
await databaseContext.Initialize(cancellationToken).ConfigureAwait(false);
await jobManager.StartAsync(cancellationToken).ConfigureAwait(false);
var dbInstances = databaseContext.Instances.Where(x => x.Online.Value)
.Include(x => x.RepositorySettings)
.Include(x => x.ChatSettings)
.ThenInclude(x => x.Channels)
.Include(x => x.DreamDaemonSettings)
.ToAsyncEnumerable();
.Include(x => x.RepositorySettings)
.Include(x => x.ChatSettings)
.ThenInclude(x => x.Channels)
.Include(x => x.DreamDaemonSettings)
.ToAsyncEnumerable();
var tasks = new List<Task>();
await factoryStartup.ConfigureAwait(false);
await dbInstances.ForEachAsync(metadata => tasks.Add(metadata.Online.Value ? OnlineInstance(metadata, cancellationToken) : Task.CompletedTask), cancellationToken).ConfigureAwait(false);