danswer/backend/onyx/indexing/indexing_heartbeat.py
2024-12-13 09:56:10 -08:00

16 lines
423 B
Python

from abc import ABC
from abc import abstractmethod
class IndexingHeartbeatInterface(ABC):
"""Defines a callback interface to be passed to
to run_indexing_entrypoint."""
@abstractmethod
def should_stop(self) -> bool:
"""Signal to stop the looping function in flight."""
@abstractmethod
def progress(self, tag: str, amount: int) -> None:
"""Send progress updates to the caller."""