mnfqueue updated
This commit is contained in:
parent
97f5af0a48
commit
cbd922371e
|
@ -81,6 +81,8 @@ def run_audit(msg):
|
|||
script_ext = body_dict.get("script_ext")
|
||||
script_file_name = body_dict.get("script_file_name")
|
||||
language = "en"
|
||||
number_of_pages = body_dict.get("number_of_pages")
|
||||
script_id = body_dict.get("script_id")
|
||||
print("112")
|
||||
object_key = "INPUT/" + str(script_file_name)
|
||||
local_file_path = "/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/media/audit_counter_files/" + script_file_name
|
||||
|
@ -99,8 +101,11 @@ def run_audit(msg):
|
|||
"author": author,
|
||||
"language": language,
|
||||
"script_ext": script_ext,
|
||||
"script_file_name": script_file_name
|
||||
"script_file_name": script_file_name,
|
||||
"number_of_pages":number_of_pages,
|
||||
"script_id": script_id,
|
||||
}
|
||||
print("audit_parameters", audit_parameters)
|
||||
run_audit_in_counter(audit_parameters)
|
||||
|
||||
|
||||
|
@ -308,14 +313,18 @@ def lpp_audit(msg):
|
|||
print("audit blockchain")
|
||||
print("blockchain script conversion 5.1")
|
||||
# blockchain upload of csv-json data
|
||||
adit_id = obj.converted_audit_id
|
||||
print("######ADIT ID",adit_id)
|
||||
try:
|
||||
adit_id = obj.converted_audit_id
|
||||
print("######ADIT ID",adit_id)
|
||||
except:
|
||||
print("adit didnt work")
|
||||
print("###########@@@@@@@@@ AUDIT ID",audit_id)
|
||||
file_to_audit = File.objects.get(
|
||||
script=audit_id,
|
||||
type="script-csv"
|
||||
)
|
||||
csv_script_path = file_to_audit.file.path
|
||||
print("csv_script_path", csv_script_path)
|
||||
df = pd.read_csv(csv_script_path)
|
||||
df = df.loc[:, ["content", "script_element"]]
|
||||
script_json: dict = json.loads(utilities.csv_to_json(df))
|
||||
|
@ -330,6 +339,7 @@ def lpp_audit(msg):
|
|||
# script_size = file_to_audit_docx.file.size
|
||||
with open(script_path1, 'rb') as _file:
|
||||
hash2 = uploadDataToIPFSNode(_file)
|
||||
print(f"hash2 is ---> {hash2}")
|
||||
script_json["script_file_path"] = script_path1
|
||||
script_json["script_file"] = hash2
|
||||
script_json["type"] = "script-json"
|
||||
|
|
Loading…
Reference in New Issue