some formatting tweaks to make errors easier to grok

This commit is contained in:
Jaremy Creechley 2023-07-26 18:45:15 -07:00
parent fdd02450aa
commit 3c940ea890
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
1 changed files with 8 additions and 6 deletions

View File

@ -69,8 +69,9 @@ proc cleanupExpired*(
trace "Cleaned up expired records", size = keys.len
proc cleanupOrphaned*(
store: Datastore,
batchSize = ExpiredCleanupBatch) {.async.} =
store: Datastore,
batchSize = ExpiredCleanupBatch
) {.async.} =
trace "Cleaning up orphaned records"
let
@ -109,10 +110,11 @@ proc cleanupOrphaned*(
continue
let
res = (await allFinished(toSeq(cidIter)))
.filterIt( it.completed )
.mapIt( it.read.get )
.filterIt( it.key.isSome ).len
queries = toSeq(cidIter)
cids = await allFinished(queries)
res = cids.filterIt( it.completed )
.mapIt( it.read.get )
.filterIt( it.key.isSome ).len
if not isNil(cidIter):
trace "Disposing cid iter"