From 57de076fec08874cd6fbbc9935fd8264a47132ef Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 27 Feb 2024 18:48:47 +0000 Subject: [PATCH] Increase database timeout --- apiserver/database.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apiserver/database.py b/apiserver/database.py index a01756c..d3694ae 100644 --- a/apiserver/database.py +++ b/apiserver/database.py @@ -5,7 +5,7 @@ from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import IntegrityError -engine = create_engine('sqlite:///data/qotnews.sqlite', connect_args={'timeout': 180}) +engine = create_engine('sqlite:///data/qotnews.sqlite', connect_args={'timeout': 360}) Session = sessionmaker(bind=engine) Base = declarative_base() @@ -118,4 +118,5 @@ def get_story_list(): if __name__ == '__main__': init() - print(get_story_by_ref('hgi3sy')) + #print(get_story_by_ref('hgi3sy')) + print(len(get_reflist(99999)))