add push notification support
This commit is contained in:
parent
6a69c5a34d
commit
1b1dcc3755
12 changed files with 175 additions and 10 deletions
|
|
@ -6,11 +6,22 @@ import configparser
|
|||
alembic = configparser.ConfigParser()
|
||||
alembic.read("alembic.ini")
|
||||
|
||||
|
||||
engine = create_engine(
|
||||
alembic.get("alembic", "sqlalchemy.url"),
|
||||
pool_pre_ping=True,
|
||||
pool_recycle=3600
|
||||
pool_recycle=1800
|
||||
)
|
||||
|
||||
SessionMaker = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
ergoEngine = create_engine(
|
||||
alembic.get("alembic", "sqlalchemy.url"),
|
||||
pool_pre_ping=True,
|
||||
pool_recycle=1800
|
||||
)
|
||||
|
||||
SessionMaker = sessionmaker(autocommit=False, autoflush=False, bind=engine, )
|
||||
|
||||
def ergoQueryFetchOne(q: str, **kwargs):
|
||||
with ergoEngine.connect() as connection:
|
||||
connection.execute(text("use ergo"))
|
||||
return connection.execute(text(q), kwargs).fetchone()
|
||||
Loading…
Add table
Add a link
Reference in a new issue