mirror of
https://github.com/docling-project/docling-serve.git
synced 2025-12-03 10:33:21 +00:00
feat: Async api (#60)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
21
docling_serve/engines/base_orchestrator.py
Normal file
21
docling_serve/engines/base_orchestrator.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from docling_serve.datamodel.engines import Task
|
||||
|
||||
|
||||
class BaseOrchestrator(ABC):
|
||||
@abstractmethod
|
||||
async def enqueue(self, task) -> Task:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def queue_size(self) -> int:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def task_status(self, task_id: str) -> Task:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def task_result(self, task_id: str):
|
||||
pass
|
||||
Reference in New Issue
Block a user