Commit 8e81b1be authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

version0.1

parent 82cdcc7d
Pipeline #3122 failed with stage
......@@ -92,6 +92,8 @@
<div class="signUpContainer">
<label><b><label for="username">Blazer Id: </label><br></b></label>
<input class="form-control" id="bid" name="bid" placeholder="Enter BlazerId" required="" type="text">
<label><b><label for="email">Email Id: </label><br></b></label>
<input class="form-control" id="email" name="email" placeholder="Enter Email Id" required="" type="text" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" >
<label><b><label for="fullname">Full Name: </label><br></b></label>
<input class="form-control" id="fullname" name="fullname" placeholder="Enter Full Name" required="" type="text">
<label><b><label for="reason">Reason for Requesting Account: </label><br></b></label>
......
......@@ -36,7 +36,7 @@ def request_account(json, methods=['GET', 'POST']):
room = str(session['uid'])
print("Room: {}".format(room))
try:
tasks.celery_create_account.delay(json['username'], json['fullname'], json['reason'], session=room)
tasks.celery_create_account.delay(json['username'], json['email'], json['fullname'], json['reason'], session=room)
except Exception as e:
print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account creation: ", e)
socketio.emit("Account creation failed", room)
......
......@@ -24,6 +24,7 @@ def celery_create_account(username, fullname, reason, session):
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
send_msg('creating account', room)
print(username)
subprocess.call(["/opt/rabbitmq_agents/flask_producer.py", "ohpc_account_create", username])
subprocess.call(["/opt/rabbitmq_agents/create_account.py", username, email, fullname, reason])
print(username + email + fullname + reason)
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username)
send_msg('account ready', room)
id = ''
password = ''
key = ''
id = 'reggie'
password = 'reggie'
key = '1234'
broker_url = 'amqp://' + id + ':' + password + '@ohpc:5672/'
message_queue = broker_url + 'socketio'
default_referrer = "https://docs.uabgrid.uab.edu/wiki/Cheaha_Quick_Start"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment