Skip to content

Commit

Permalink
Revert "Attempt to fix #2227"
Browse files Browse the repository at this point in the history
This reverts commit b00334a.
  • Loading branch information
finestructure committed Nov 27, 2023
1 parent 70d81dd commit fc5fbd0
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions Sources/App/Commands/Analyze.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ enum Analyze {

func run(using context: CommandContext, signature: SPICommand.Signature) async throws {
let client = context.application.client
let eventLoop = context.application.eventLoopGroup.any()
let db = context.application._db(.psql, on: eventLoop)
let db = context.application.db
let logger = Logger(component: "analyze")
Current.setLogger(logger)

Expand Down Expand Up @@ -718,18 +717,3 @@ extension Analyze {
}

}


// WIP attempted fix for issue 2227 https://github.com/vapor/async-kit/issues/104#issuecomment-1685273685
private extension Application {
func _db(_ id: DatabaseID?, on eventLoop: any EventLoop) -> any Database {
self.databases
.database(
id,
logger: self.logger,
on: eventLoop,
history: nil,
pageSizeLimit: self.fluent.pagination.pageSizeLimit
)!
}
}

0 comments on commit fc5fbd0

Please sign in to comment.