Compare commits

..

3 Commits

Author SHA1 Message Date
Ubuntu 645033a26e Merge branch 'main' of http://1.6.141.109:3000/dharmesh/Conversion_Kitchen_Code
becuase i did manual changes in git
2024-06-19 07:34:00 +00:00
Ubuntu 7cd8c3946a conversion changes audit from one particular user 2024-06-19 07:31:14 +00:00
Ubuntu 6e15d10fd0 CFD issues of translation failing and audit user changed to Brainstorm 2024-06-15 12:00:00 +00:00
3 changed files with 12 additions and 10 deletions

View File

@ -50,8 +50,9 @@ def run_conversion(msg):
)
s3_client.download_file("conversion-kitchen", object_key, local_file_path)
audit_user = User.objects.get(id=1)
conversion_params = {
"audit_user": audit_user,
"user": translated_script.user_id,
"file_path": str(basePath) + "/media/" + translated_script.script_link_id.script.name,
"original_script_id": translated_script.script_link_id.script_id,

View File

@ -42,6 +42,7 @@ basePath = BasePath()
class Conversion:
def __init__(self, **conversion_params):
self.audit_user = conversion_params['audit_user']
self.user = conversion_params['user']
self.file_path = conversion_params['file_path']
self.original_script_object = MNFScriptDatabase.objects.get(
@ -122,8 +123,8 @@ class Conversion:
)
language_code = "en"
result = filesystem.new_screenplay_without_audit_in_background(
self.user,
self.user.username,
self.audit_user,
self.audit_user.username,
str(self.name_script),
file,
"script-original",
@ -216,8 +217,8 @@ class Conversion:
)
language_code = "en"
result = filesystem.new_screenplay_without_audit_in_background(
self.user,
self.user.username,
self.audit_user,
self.audit_user.username,
str(self.name_script),
file,
"script-original",
@ -307,8 +308,8 @@ class Conversion:
language_code = "en"
unique_str = "_" + str(int(time.time()))
result = filesystem.new_screenplay_without_audit_in_background(
self.user,
self.user.username,
self.audit_user,
self.audit_user.username,
str(self.name_script)+str(unique_str),
file,
"script-original",

View File

@ -194,6 +194,6 @@ def checker(text, src_lang, tar_lang):
# end_time = time.time()
# print("Time took is ->", end_time - start_time)
print("Prince was Here!!!")
text = "Amazing to see everything alright."
checker(text, 'en', 'el')
# print("Prince was Here!!!")
# text = "Amazing to see everything alright."
# checker(text, 'en', 'el')