mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-05 04:01:31 +02:00
Removing deprecated field
This commit is contained in:
@ -190,7 +190,7 @@ def update_loop(delay: int = 10) -> None:
|
|||||||
start = time.time()
|
start = time.time()
|
||||||
logger.info(f"Running update, current time: {time.ctime(start)}")
|
logger.info(f"Running update, current time: {time.ctime(start)}")
|
||||||
try:
|
try:
|
||||||
with Session(engine, future=True, expire_on_commit=False) as db_session:
|
with Session(engine, expire_on_commit=False) as db_session:
|
||||||
create_indexing_jobs(db_session)
|
create_indexing_jobs(db_session)
|
||||||
run_indexing_jobs(db_session)
|
run_indexing_jobs(db_session)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -136,7 +136,7 @@ def create_initial_public_credential() -> None:
|
|||||||
"DB is not in a valid initial state."
|
"DB is not in a valid initial state."
|
||||||
"There must exist an empty public credential for data connectors that do not require additional Auth."
|
"There must exist an empty public credential for data connectors that do not require additional Auth."
|
||||||
)
|
)
|
||||||
with Session(build_engine(), future=True, expire_on_commit=False) as db_session:
|
with Session(build_engine(), expire_on_commit=False) as db_session:
|
||||||
first_credential = fetch_credential_by_id(public_cred_id, None, db_session)
|
first_credential = fetch_credential_by_id(public_cred_id, None, db_session)
|
||||||
|
|
||||||
if first_credential is not None:
|
if first_credential is not None:
|
||||||
|
@ -60,12 +60,12 @@ def build_async_engine() -> AsyncEngine:
|
|||||||
|
|
||||||
|
|
||||||
def get_session() -> Generator[Session, None, None]:
|
def get_session() -> Generator[Session, None, None]:
|
||||||
with Session(build_engine(), future=True, expire_on_commit=False) as session:
|
with Session(build_engine(), expire_on_commit=False) as session:
|
||||||
yield session
|
yield session
|
||||||
|
|
||||||
|
|
||||||
async def get_async_session() -> AsyncGenerator[AsyncSession, None]:
|
async def get_async_session() -> AsyncGenerator[AsyncSession, None]:
|
||||||
async with AsyncSession(
|
async with AsyncSession(
|
||||||
build_async_engine(), future=True, expire_on_commit=False
|
build_async_engine(), expire_on_commit=False
|
||||||
) as async_session:
|
) as async_session:
|
||||||
yield async_session
|
yield async_session
|
||||||
|
Reference in New Issue
Block a user