Skip to content
Snippets Groups Projects
Commit a3b9093c authored by Mitchell Moore's avatar Mitchell Moore
Browse files

Check for creation

parent ca92d281
No related branches found
No related tags found
1 merge request!35Version 1b openstack rabbitmq
......@@ -42,6 +42,8 @@ def check_dir(user, interval):
def create_account(username, fullname, reason):
# Todo: Ravi's and Louis's code go here
print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
socketio.emit("creating account")
time.sleep(5)
......@@ -63,8 +65,6 @@ def ingest_data(json, methods=['GET', 'POST']):
try:
create_account(json['username'], json['fullname'], json['reason'])
print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + json["username"] + ' added to queue')
socketio.emit("creating account")
except Exception as e:
print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account creation: ", e)
......@@ -77,10 +77,8 @@ def creation_confirmation(json, methods=['GET', 'POST']):
# User create Script Approach
username = json["username"]
fullname = json["fullname"]
reason = json["reason"]
if create_account(username, fullname, reason):
if account_confirmation(username):
print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username)
socketio.emit("Account created")
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment