diff options
Diffstat (limited to 'utils/qa_check_developer.py')
-rw-r--r-- | utils/qa_check_developer.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/utils/qa_check_developer.py b/utils/qa_check_developer.py index e31f533..cd0b436 100644 --- a/utils/qa_check_developer.py +++ b/utils/qa_check_developer.py @@ -60,21 +60,21 @@ if __name__ == '__main__': devs = download_and_parse_devs() b0rks = [] timestamp = datetime.now() - with app.test_request_context(): - # Load configuration - app.config.from_pyfile(args[0]) - # Fetch list of developers from db - dbdevs = [d.email for d in Developer.query.filter( \ - Developer.email.like('%@gentoo.org')).all()] - for dev in dbdevs: - if dev in devs: - devs.remove(dev) - else: - b0rks.append(dev) - insert_issues(b0rks) - # Clean up issues < timestamp - gc_collect(timestamp) - # Update settings and add info about last run.. - Setting.query.filter_by(name=PLUGIN_NAME).delete(False) - db.session.add(Setting(PLUGIN_NAME, str(timestamp))) - db.session.commit() + app.test_request_context().push() + # Load configuration + app.config.from_pyfile(args[0]) + # Fetch list of developers from db + dbdevs = [d.email for d in Developer.query.filter( \ + Developer.email.like('%@gentoo.org')).all()] + for dev in dbdevs: + if dev in devs: + devs.remove(dev) + else: + b0rks.append(dev) + insert_issues(b0rks) + # Clean up issues < timestamp + gc_collect(timestamp) + # Update settings and add info about last run.. + Setting.query.filter_by(name=PLUGIN_NAME).delete(False) + db.session.add(Setting(PLUGIN_NAME, str(timestamp))) + db.session.commit() |