Compare commits

..

No commits in common. "645033a26e60262e79112e8c3679e09b4936bec3" and "174bc7008a99ed8784e27a47f6ea86c61b9e7860" have entirely different histories.

3 changed files with 10 additions and 12 deletions

View File

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

View File

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

View File

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