Skip to content

Commit 32b16bf

Browse files
committed
add comments
1 parent e0bc6ea commit 32b16bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Examples/ServiceLifecycle/Sources/Lambda.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)