Skip to content

Commit

Permalink
fix(suspicious): api run migrations async
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Nov 21, 2024
1 parent a955901 commit 040d953
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ public void Configure(
}
});

MigrationsHelper.Run(
_configuration.GetConnectionString("Integration"),
serviceProvider.GetService<ILoggerFactory>());
appLifetime.ApplicationStarted.Register(() =>
{
MigrationsHelper.Run(
_configuration.GetConnectionString("Integration"),
serviceProvider.GetService<ILoggerFactory>());
});

StartupHelpers.CheckDatabases(healthCheckService, DatabaseTag, loggerFactory).GetAwaiter().GetResult();
}
Expand Down

0 comments on commit 040d953

Please sign in to comment.