mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-13 05:10:13 +02:00
16 lines
423 B
Python
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."""
|