db: bugfix with closed connection on subsequent srapping

This commit is contained in:
Kirill Zhukov 2023-03-10 11:41:01 +01:00
parent 22fb4a6423
commit d54ab39941

View File

@ -64,12 +64,13 @@ def start(yml_path: str):
logging.error('unsupported DB schema: want %s, have %s',
DB_SCHEMA_VER, cur_version)
sys.exit(1)
db.close_conn()
while True:
logging.info('Starting extraction proccess')
api = APIclient(api_root=config.albs_url,
jwt=config.jwt, timeout=config.api_timeout)
db = DB(config.db_config)
extractor = Extractor(config, api, db)
logging.info('Starting builds insertion')