File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Examples/ServiceLifecycle/Sources Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ struct LambdaFunction {
7676 // See: https://github.com/vapor/postgres-nio/issues/489#issuecomment-2186509773
7777 result = try await timeout ( deadline: . seconds( 3 ) ) {
7878 // check if table exists
79+ // TODO: ideally, I want to do this once, after serviceGroup.run() is done
80+ // but before the handler is called
7981 logger. trace ( " Checking database " )
8082 try await prepareDatabase ( )
8183
@@ -94,7 +96,6 @@ struct LambdaFunction {
9496 /// At first run, this functions checks the database exist and is populated.
9597 /// This is useful for demo purposes. In real life, the database will contain data already.
9698 private func prepareDatabase( ) async throws {
97- logger. trace ( " Preparing to the database " )
9899 do {
99100
100101 // initial creation of the table. This will fails if it already exists
You can’t perform that action at this time.
0 commit comments