diff options
Diffstat (limited to 'src/main.py')
-rw-r--r-- | src/main.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.py b/src/main.py index fb2eec4..4e1bab3 100644 --- a/src/main.py +++ b/src/main.py @@ -277,15 +277,19 @@ def main_loop(): try: config = get_config() setup_logging(config) - settings = config.get('settings', {}) - pbn = get_pbn_source(config.get('source')) + db = TeamyDB(config.get('mysql')) + pbn = get_pbn_source(config.get('source')) + + settings = config.get('settings', {}) if settings.get('fetch_lineups', 0) > 0: fetch_lineups(pbn, db, settings) + fetch_scores(pbn, db, settings) except Exception as ex: logging.error(ex) raise + return settings.get('job_interval', 60) |