|
|
@ -339,19 +339,6 @@ def new_publish(args, publish_type, vehicle, language, version): |
|
|
|
|
|
|
|
@frappe.whitelist() |
|
|
|
def merge_json_files(old_json_path, new_json_path, out_file_path): |
|
|
|
# old_json_path = '/home/ubuntu/frappe-bench/sites/guidedsmartservice.com/public/files/json_files/full_update/XUV 0613/XUV 0613-en-full_v1.0.json' |
|
|
|
# new_json_path = '/home/ubuntu/frappe-bench/sites/guidedsmartservice.com/public/files/json_files/global/XUV 0613/XUV 0613-en_v2.00.json' |
|
|
|
# out_file_path = '/home/ubuntu/frappe-bench/sites/guidedsmartservice.com/public/files/json_files/full_update/XUV 0613/XUV 0613-en-full_update_test.json' |
|
|
|
|
|
|
|
# return old_json_path,new_json_path,out_file_path |
|
|
|
# rate_res = custom_rate_limit(limit=5, seconds=15) |
|
|
|
# if rate_res != 1: |
|
|
|
# return rate_res |
|
|
|
# val = input_validation(old_json_path=old_json_path, |
|
|
|
# new_json_path=new_json_path, out_file_path=out_file_path) |
|
|
|
# if val != '': |
|
|
|
# return {status: 0, error: "Parameter missing :" + val} |
|
|
|
|
|
|
|
try: |
|
|
|
with open(old_json_path, 'r') as json_file: |
|
|
|
data_old = json.load(json_file) |
|
|
@ -562,7 +549,6 @@ def merge_json_files(old_json_path, new_json_path, out_file_path): |
|
|
|
return True, out_file_path |
|
|
|
except Exception as e: |
|
|
|
return False, frappe.get_traceback() |
|
|
|
# return "Exception in publish" |
|
|
|
|
|
|
|
|
|
|
|
@frappe.whitelist() |
|
|
@ -876,7 +862,7 @@ def upv(): |
|
|
|
# frappe.db.commit() |
|
|
|
return 1 |
|
|
|
|
|
|
|
|
|
|
|
""" Generate publish """ |
|
|
|
@frappe.whitelist() |
|
|
|
def run_publish(): |
|
|
|
new_publish('THAR-en -2023-05-21 16:57:54.119826', |
|
|
|