Open PhilipMay opened 1 year ago
https://github.com/telekom/spider-scrape/blob/e6cadb3bc82d9dfdfbd2e9949baa90ea15ec7743/spider_scrape/arango_db.py#L42
just:
with closing(cursor):
Or even better this?
try: for doc in tqdm(cursor): data.extend(extract_doc(doc)) finally: cursor.close(ignore_missing=True)
https://github.com/telekom/spider-scrape/blob/e6cadb3bc82d9dfdfbd2e9949baa90ea15ec7743/spider_scrape/arango_db.py#L42
just: