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

View File

@ -70,7 +70,8 @@ proc cleanupExpired*(
proc cleanupOrphaned*(
store: Datastore,
batchSize = ExpiredCleanupBatch) {.async.} =
batchSize = ExpiredCleanupBatch
) {.async.} =
trace "Cleaning up orphaned records"
let
@ -109,8 +110,9 @@ proc cleanupOrphaned*(
continue
let
res = (await allFinished(toSeq(cidIter)))
.filterIt( it.completed )
queries = toSeq(cidIter)
cids = await allFinished(queries)
res = cids.filterIt( it.completed )
.mapIt( it.read.get )
.filterIt( it.key.isSome ).len