commit to db when done

This commit is contained in:
Lynne Megido 2019-09-11 15:23:00 +10:00
parent 83ceb83e72
commit bb7c50a648
2 changed files with 4 additions and 0 deletions

View File

@ -99,4 +99,6 @@ accounts = cursor.fetchall()
with Pool(cfg['service_threads']) as p:
p.map(scrape_posts, accounts)
db.commit()
print("Done!")

View File

@ -29,3 +29,5 @@ with Pool(cfg['service_threads']) as p:
p.map(functions.make_post, bots)
#TODO: other cron tasks should be done here, like updating profile pictures
db.commit()