File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed
Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -139,19 +139,8 @@ actor DatabasePool {
139139 }
140140
141141 private func retainDatabase( ) async throws -> Database {
142- // let start = Date()
143- // print("ℹ️ \(#function) start")
144- // defer { print("ℹ️ \(#function) end", Date().timeIntervalSince(start)) }
145142 var database = availableDatabases. randomElement ( )
146- // var retry = 0
147143 while database == nil {
148- // defer { retry += 1 }
149- // if retry > 0 && retry % 50 == 0 {
150- // print("ℹ️ \(#function) available databases: \(availableDatabases.count) retry \(retry)")
151- // }
152- // if retry >= 1000 {
153- // throw "Retry count exceeded"
154- // }
155144 try await Task . sleep ( for: . milliseconds( 10 ) )
156145 database = availableDatabases. randomElement ( )
157146 }
You can’t perform that action at this time.
0 commit comments