mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use enumerate to get index from for loop
This commit is contained in:
parent
e68f7b42ba
commit
4c30a4f561
1 changed files with 1 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ async def insert_into_postgres(insert_query, db_conn, records, original_ids):
|
|||
except Exception as err:
|
||||
print('Batch insert into postgres ERROR:', err)
|
||||
# excute insert query one by one if batch insert failed
|
||||
for i, record in records:
|
||||
for i, record in enumerate(records):
|
||||
# print original id for debugging
|
||||
print('Inserting record', original_ids[i])
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue