diff --git a/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs b/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs index 0e97d98f6c..5b2fbde5ba 100644 --- a/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs +++ b/src/Tgstation.Server.Host/Database/DatabaseSeeder.cs @@ -133,16 +133,26 @@ namespace Tgstation.Server.Host.Database instance.Path = instance.Path.Replace('\\', '/'); } - // Update settings from config - var rowsUpdated = await databaseContext + var ids = await databaseContext .DreamDaemonSettings .AsQueryable() .Where(x => x.TopicRequestTimeout == 0) - .UpdateAsync( - settings => new DreamDaemonSettings { TopicRequestTimeout = generalConfiguration.ByondTopicTimeout }, - cancellationToken) + .Select(x => x.Id) + .ToListAsync(cancellationToken) .ConfigureAwait(false); + var rowsUpdated = ids.Count; + foreach (var id in ids) + { + var newDDSettings = new DreamDaemonSettings + { + Id = id + }; + + databaseContext.DreamDaemonSettings.Attach(newDDSettings); + newDDSettings.TopicRequestTimeout = generalConfiguration.ByondTopicTimeout; + } + if (rowsUpdated > 0) logger.LogInformation( "Updated {0} instances to use database backed BYOND topic timeouts from configuration setting of {1}",