27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
import logging
|
|
from conversion.translation.external_conversion import Conversion
|
|
from mnfapp.models import ScriptTranslations
|
|
|
|
def my_conversion_queue():
|
|
print("Started Execution")
|
|
try:
|
|
translated_script = ScriptTranslations.objects.get(translation_id="3ccf8a5d-b29c-4ee0-9c40-85feb7c8e101")
|
|
|
|
|
|
conversion_params = {
|
|
"user": translated_script.user_id,
|
|
"file_path": "/home/mnfidea/dharmesh_conversion2/dharmesh_conversion/media/" + translated_script.script_link_id.script.name,
|
|
"original_script_id": translated_script.script_link_id.script_id,
|
|
"translated_script_id": translated_script.translation_id,
|
|
"sample_id": None,
|
|
"existing_script": None,
|
|
"iteration_no": None,
|
|
"juggernaut_pages_deduction": None,
|
|
"language_set": None,
|
|
"amount_without_subscrption": None
|
|
}
|
|
|
|
obj = Conversion(**conversion_params)
|
|
obj.convert()
|
|
except Exception as e:
|
|
print("error:", e) |