From bb7c50a6484241c598b961d59d25beda671aab1b Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 11 Sep 2019 15:23:00 +1000 Subject: [PATCH] commit to db when done --- scrape.py | 2 ++ service.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scrape.py b/scrape.py index b041a67..cf386fa 100644 --- a/scrape.py +++ b/scrape.py @@ -99,4 +99,6 @@ accounts = cursor.fetchall() with Pool(cfg['service_threads']) as p: p.map(scrape_posts, accounts) +db.commit() + print("Done!") diff --git a/service.py b/service.py index 25964d1..cd2bdfc 100755 --- a/service.py +++ b/service.py @@ -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()