diff --git a/backend/danswer/background/celery/tasks/indexing/tasks.py b/backend/danswer/background/celery/tasks/indexing/tasks.py index 5e574944b21..a353e7fe215 100644 --- a/backend/danswer/background/celery/tasks/indexing/tasks.py +++ b/backend/danswer/background/celery/tasks/indexing/tasks.py @@ -82,8 +82,6 @@ def should_stop(self) -> bool: return False def progress(self, tag: str, amount: int) -> None: - # logger.debug(f"IndexingCallback: tag={tag} amount={amount}") - try: self.redis_lock.reacquire() self.last_tag = tag diff --git a/backend/danswer/indexing/indexing_heartbeat.py b/backend/danswer/indexing/indexing_heartbeat.py index 195929d2654..fe5f83d0b86 100644 --- a/backend/danswer/indexing/indexing_heartbeat.py +++ b/backend/danswer/indexing/indexing_heartbeat.py @@ -1,43 +1,6 @@ from abc import ABC from abc import abstractmethod -from danswer.utils.logger import setup_logger - -# from danswer.db.index_attempt import get_index_attempt - -logger = setup_logger() - - -# class Heartbeat(abc.ABC): -# """Useful for any long-running work that goes through a bunch of items -# and needs to occasionally give updates on progress. -# e.g. chunking, embedding, updating vespa, etc.""" - -# @abc.abstractmethod -# def heartbeat(self, metadata: Any = None) -> None: -# raise NotImplementedError - - -# class IndexingHeartbeat(Heartbeat): -# def __init__(self, index_attempt_id: int, db_session: Session, freq: int): -# self.cnt = 0 - -# self.index_attempt_id = index_attempt_id -# self.db_session = db_session -# self.freq = freq - -# def heartbeat(self, metadata: Any = None) -> None: -# self.cnt += 1 -# if self.cnt % self.freq == 0: -# index_attempt = get_index_attempt( -# db_session=self.db_session, index_attempt_id=self.index_attempt_id -# ) -# if index_attempt: -# index_attempt.time_updated = func.now() -# self.db_session.commit() -# else: -# logger.error("Index attempt not found, this should not happen!") - class IndexingHeartbeatInterface(ABC): """Defines a callback interface to be passed to