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