rm annotation
This commit is contained in:
parent
634995e9c8
commit
15946b196d
1 changed files with 8 additions and 2 deletions
|
|
@ -140,19 +140,25 @@ class TaskProcessor:
|
||||||
raise
|
raise
|
||||||
return {"status": "indexed", "id": file_hash}
|
return {"status": "indexed", "id": file_hash}
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
async def process_item(
|
async def process_item(
|
||||||
self, upload_task: UploadTask, item: Any, file_task: FileTask
|
self, upload_task: UploadTask, item: Any, file_task: FileTask
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Process a single item in the task.
|
Process a single item in the task.
|
||||||
|
|
||||||
|
This is a base implementation that should be overridden by subclasses.
|
||||||
|
When TaskProcessor is used directly (not via subclass), this method
|
||||||
|
is not called - only the utility methods like process_document_standard
|
||||||
|
are used.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
upload_task: The overall upload task
|
upload_task: The overall upload task
|
||||||
item: The item to process (could be file path, file info, etc.)
|
item: The item to process (could be file path, file info, etc.)
|
||||||
file_task: The specific file task to update
|
file_task: The specific file task to update
|
||||||
"""
|
"""
|
||||||
pass
|
raise NotImplementedError(
|
||||||
|
"process_item should be overridden by subclasses when used in task processing"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class DocumentFileProcessor(TaskProcessor):
|
class DocumentFileProcessor(TaskProcessor):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue