Conversation
|
@PeterNerlich @hannaseithe I have played around a bit to find a way to move deepl api calls to celery, and this is the work in progress. But I'm not really happy with it currently. The main problem is that everything that is passed to celery needs to be JSON-serializable, while our ApiClient is designed to have a lot of rich objects as attributes. |
For linkcheck I recently tried to work on a wrapper to point to an arbitrary object by specifying the django app defining the model, the model name, and the id. Wouldn't this suffice here as well? |
|
Just some ai-assisted thoughts:
and back to you initial question @jonbulz - one alternative could be creating a TranslationJob model: Then the Celery task just receives job_id: Benefits:
|
Short description
Add option for async machine translations (only for Deepl thus far)
Proposed changes
translate_asynboolean flag totranslate_querysetinMachineTranslationApiClienttranslate_async=TrueSide effects
Faithfulness to issue description and design
There are no intended deviations from the issue and design.
How to test
Resolved issues
Fixes: #3852
Pull Request Review Guidelines