mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 18:36:23 +02:00
chore: ran all linting
This commit is contained in:
parent
2470fb70a6
commit
76e7ddee2f
22 changed files with 638 additions and 433 deletions
|
|
@ -1005,9 +1005,7 @@ async def _process_circleback_meeting(
|
|||
|
||||
# Start Redis heartbeat for stale task detection
|
||||
_start_heartbeat(notification.id)
|
||||
heartbeat_task = asyncio.create_task(
|
||||
_run_heartbeat_loop(notification.id)
|
||||
)
|
||||
heartbeat_task = asyncio.create_task(_run_heartbeat_loop(notification.id))
|
||||
|
||||
log_entry = await task_logger.log_task_start(
|
||||
task_name="process_circleback_meeting",
|
||||
|
|
|
|||
|
|
@ -45,9 +45,8 @@ _redis_client: redis.Redis | None = None
|
|||
|
||||
# Error messages shown to users when tasks are interrupted
|
||||
STALE_SYNC_ERROR_MESSAGE = "Sync was interrupted unexpectedly. Please retry."
|
||||
STALE_PROCESSING_ERROR_MESSAGE = (
|
||||
"Syncing was interrupted unexpectedly. Please retry."
|
||||
)
|
||||
STALE_PROCESSING_ERROR_MESSAGE = "Syncing was interrupted unexpectedly. Please retry."
|
||||
|
||||
|
||||
def get_redis_client() -> redis.Redis:
|
||||
"""Get or create Redis client for heartbeat checking."""
|
||||
|
|
@ -310,9 +309,7 @@ async def _cleanup_stale_document_processing_notifications():
|
|||
in_progress_rows = result.fetchall()
|
||||
|
||||
if not in_progress_rows:
|
||||
logger.debug(
|
||||
"No in-progress document processing notifications found"
|
||||
)
|
||||
logger.debug("No in-progress document processing notifications found")
|
||||
return
|
||||
|
||||
# Check which ones are missing heartbeat keys in Redis
|
||||
|
|
@ -389,9 +386,7 @@ async def _cleanup_stale_document_processing_notifications():
|
|||
await session.rollback()
|
||||
|
||||
|
||||
async def _cleanup_stuck_non_connector_documents(
|
||||
session, document_ids: list[int]
|
||||
):
|
||||
async def _cleanup_stuck_non_connector_documents(session, document_ids: list[int]):
|
||||
"""
|
||||
Mark specific non-connector documents stuck in pending/processing as failed.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue