File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,15 @@ async def main():
2424 )
2525 limit = 100
2626
27- offset = 0
2827 query = (
2928 select (Transaction .id , Transaction .txid )
30- .limit (limit )
3129 .filter (Transaction .addresses == ())
3230 .limit (limit )
3331 )
3432
35- total /= limit
33+ processed = 0
3634
37- while txs := (await session .execute (query .offset (offset ))).all ():
38- offset += limit
35+ while txs := (await session .execute (query )).all ():
3936
4037 transactions_result = await make_request (
4138 settings .blockchain .endpoint ,
@@ -71,8 +68,9 @@ async def main():
7168 execution_options = {"synchronize_session" : False },
7269 )
7370 await session .commit ()
71+ processed += limit
7472 print (
75- f"Progress: { offset // limit } /{ total } ({ (offset // limit / total )* 100 :.2f} )" ,
73+ f"Progress: { processed } /{ total } ({ (processed / total )* 100 :.2f} )" ,
7674 end = "\r " ,
7775 flush = True ,
7876 )
You can’t perform that action at this time.
0 commit comments