Skip to content

Commit 93fe8cc

Browse files
committed
mypy fix
1 parent 7c64223 commit 93fe8cc

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

backend/onyx/background/indexing/index_attempt_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_index_attempts(
1414
cutoff_date = get_db_current_time(db_session) - timedelta(days=days_to_keep)
1515
return (
1616
db_session.query(IndexAttempt)
17-
.filter(IndexAttempt.created_at < cutoff_date)
17+
.filter(IndexAttempt.time_created < cutoff_date)
1818
.all()
1919
)
2020

backend/onyx/server/documents/connector.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
from onyx.server.models import StatusResponse
139139
from onyx.utils.logger import setup_logger
140140
from onyx.utils.telemetry import create_milestone_and_report
141+
from onyx.utils.threadpool_concurrency import CallableProtocol
141142
from onyx.utils.threadpool_concurrency import run_functions_tuples_in_parallel
142143
from onyx.utils.variable_functionality import fetch_ee_implementation_or_noop
143144
from shared_configs.contextvars import get_current_tenant_id
@@ -889,16 +890,6 @@ def get_connector_indexing_status_with_pagination(
889890
) -> list[ConnectorIndexingStatusLiteResponse]:
890891
tenant_id = get_current_tenant_id()
891892

892-
if MOCK_CONNECTOR_FILE_PATH:
893-
import json
894-
895-
with open(MOCK_CONNECTOR_FILE_PATH, "r") as f:
896-
raw_data = json.load(f)
897-
connector_indexing_statuses = [
898-
ConnectorIndexingStatus(**status) for status in raw_data
899-
]
900-
return connector_indexing_statuses
901-
902893
# NOTE: If the connector is deleting behind the scenes,
903894
# accessing cc_pairs can be inconsistent and members like
904895
# connector or credential may be None.
@@ -910,7 +901,7 @@ def get_connector_indexing_status_with_pagination(
910901
# sqlalchemy-method-connection-for-bind-is-already-in-progress
911902
# for why we can't pass in the current db_session to these functions
912903

913-
parallel_functions = [
904+
parallel_functions: list[tuple[CallableProtocol, tuple[Any, ...]]] = [
914905
# Get editable connector/credential pairs
915906
(
916907
get_connector_credential_pairs_for_user_parallel,

0 commit comments

Comments
 (0)