Improve startup

This commit is contained in:
Christoph Hagen
2023-11-22 10:02:16 +01:00
parent 848ff21134
commit 14f06072ad
3 changed files with 27 additions and 15 deletions

View File

@@ -5,11 +5,5 @@ var env = Environment.production
try LoggingSystem.bootstrap(from: &env)
let app = Application(env)
defer { app.shutdown() }
private let semaphore = DispatchSemaphore(value: 0)
Task {
try await configure(app)
semaphore.signal()
}
semaphore.wait()
try configure(app)
try app.run()