fix: register translate task in celery_worker and add setting metadata
- Import translate_to_default_language in celery_worker.py - Add default_document_language to SETTING_METADATA in settings_service.py Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -39,6 +39,7 @@ from app.tasks.refine_text_with_gpt import refine_text_with_gpt # noqa: F401
|
|||||||
from app.tasks.rotate_pdf_pages import rotate_pdf_pages # noqa: F401
|
from app.tasks.rotate_pdf_pages import rotate_pdf_pages # noqa: F401
|
||||||
from app.tasks.send_to_all import send_to_all_destinations # noqa: F401
|
from app.tasks.send_to_all import send_to_all_destinations # noqa: F401
|
||||||
from app.tasks.subscription_tasks import apply_pending_subscription_changes_all # noqa: F401
|
from app.tasks.subscription_tasks import apply_pending_subscription_changes_all # noqa: F401
|
||||||
|
from app.tasks.translate_to_default_language import translate_to_default_language # noqa: F401
|
||||||
|
|
||||||
# Import new send tasks
|
# Import new send tasks
|
||||||
from app.tasks.upload_to_dropbox import upload_to_dropbox # noqa: F401
|
from app.tasks.upload_to_dropbox import upload_to_dropbox # noqa: F401
|
||||||
|
|||||||
@@ -522,6 +522,19 @@ SETTING_METADATA = {
|
|||||||
"required": False,
|
"required": False,
|
||||||
"restart_required": False,
|
"restart_required": False,
|
||||||
},
|
},
|
||||||
|
# Document Translation
|
||||||
|
"default_document_language": {
|
||||||
|
"category": "AI Services",
|
||||||
|
"description": (
|
||||||
|
"ISO 639-1 language code for the default document translation target "
|
||||||
|
"(e.g. 'en', 'de', 'fr'). Documents whose detected language differs "
|
||||||
|
"are automatically translated into this language after processing."
|
||||||
|
),
|
||||||
|
"type": "string",
|
||||||
|
"sensitive": False,
|
||||||
|
"required": False,
|
||||||
|
"restart_required": False,
|
||||||
|
},
|
||||||
# OCR Engine Configuration
|
# OCR Engine Configuration
|
||||||
"ocr_providers": {
|
"ocr_providers": {
|
||||||
"category": "OCR Engines",
|
"category": "OCR Engines",
|
||||||
|
|||||||
Reference in New Issue
Block a user