customserverChangeFromDEVQUEUEtoMNFQUEUE

This commit is contained in:
Ubuntu 2025-03-25 06:38:43 +00:00
parent 04c4b04ba9
commit dbbf25b9ee
1 changed files with 18 additions and 7 deletions

View File

@ -22,6 +22,7 @@ from io import BytesIO
from auto_email.views import sendmail
from lpp.certificate.createCertificate import certificateGenrate
from scriptAudit.utils import update_audit_status
# from django.conf import settings
basePath = BasePath()
@ -172,7 +173,9 @@ def lpp_audit(msg):
print("ran till here 4")
try:
language_code = "en"
name_script = (str(local_file_path).split("."))[0] + "_vetted_a" + "." + (str(local_file_path).split("."))[1]
# name_script = (str(local_file_path).split("."))[0] + "_vetted_a" + "." + (str(local_file_path).split("."))[1]
filename = str(local_file_path).split("/")[-1]
name_script = filename.split("_vetted_a")[0]
doc_file = f"{local_file_path}"
file1 = ContentFile(
open(doc_file, 'rb').read(),
@ -314,6 +317,7 @@ def lpp_audit(msg):
script_json["script_file_path"] = script_path1
script_json["script_file"] = hash2
script_json["type"] = "script-json"
script_json["screenplay_name"] = str(name_script)
scriptconversion["script-json"] = script_json
print("blockchain script conversion 5.2")
@ -362,13 +366,20 @@ def lpp_audit(msg):
hash = hash_decrypation(hash)
to_email = [lpp_user.user_id.email]
email_code = 'BL1'
#key_value = {
# "service": "script conversion",
# "hash": hash,
# "public key": blockchain_obj.publicKey,
# "private key": userkey.decode('utf-8'),
# "Transaction Hash": tx_id
#}
key_value = {
"service": "script conversion",
"hash": hash,
"public key": blockchain_obj.publicKey,
"private key": userkey.decode('utf-8'),
"Transaction Hash": tx_id
"Product Name": "script conversion",
"Profile url": f"{settings.SITE_DOMAIN}/memberpage/#/personaldetails",
"User url": f"{settings.SITE_DOMAIN}/memberpage/#/user/{lpp_user.user_id.id}/personaldetails",
"Product output card url": f"{settings.SITE_DOMAIN}/conversion/view_conversion/"
}
sendmail(to_email=to_email, email_code=email_code, key_value=key_value,
filePath=certificatepath)
import boto3
@ -441,7 +452,7 @@ class Command(BaseCommand):
sqs = session.resource('sqs', region_name='ap-south-1')
print("Started Executin this from conversion")
queue = sqs.get_queue_by_name(QueueName="devqueue")
queue = sqs.get_queue_by_name(QueueName="mnfqueue")
# try:
while True: