Commit 14d8c5b8 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

decode json object, create account usinf rc_util call, wait for account...

decode json object, create account usinf rc_util call, wait for account creation to complete using rc_util.consume
parent 67411789
......@@ -3,6 +3,7 @@ import time
from flask_socketio import SocketIO
import subprocess
import vars
import rc_util
from gevent import monkey
......@@ -19,12 +20,17 @@ def send_msg(event, room):
def celery_create_account(username, fullname, reason, session):
def celery_create_account(json, session):
room = session
username= json['username']
email= json['email']
fullname= json['fullname']
reason= json['reason']
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
send_msg('creating account', room)
print(username)["/opt/rabbitmq_agents/", username, email, fullname, reason])
print(username + email + fullname + reason)["/opt/rabbitmq_agents/", username, email, fullname, reason])
rc_util.add_account(username, email, fullname, reason)
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username)
send_msg('account ready', room)
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