Compare commits
3 Commits
174bc7008a
...
645033a26e
Author | SHA1 | Date |
---|---|---|
Ubuntu | 645033a26e | |
Ubuntu | 7cd8c3946a | |
Ubuntu | 6e15d10fd0 |
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue