Commit 2b20027d authored by root's avatar root
Browse files

timeout code

parent 6afd3884
Pipeline #4192 canceled with stage
......@@ -3,6 +3,9 @@ import time
from flask_socketio import SocketIO
import subprocess
import vars
import sys
sys.path.append('/cm/shared/rabbitmq_agents/')
import rc_util
from gevent import monkey
......@@ -31,6 +34,19 @@ def celery_create_account(json, session):
send_msg('creating account', room)
print(username)
rc_util.add_account(username, email, fullname, reason)
rc_util.consume(username)
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username)
send_msg('account ready', room)
print('sent account info')
# rc_util.consume(username)
# print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username)
# send_msg('account ready', room)
# return
#rc_util.add_account(args.username, email=args.email, full=args.full_name, reason=args.reason)
#print(f'Account for {args.username} requested.')
# Set initial timeout timer
signal.signal(signal.SIGALRM, timeout_handler)
signal.setitimer(signal.ITIMER_REAL, timeout)
print('Waiting for completion...')
rc_util.consume(args.username, routing_key=f'complete.{args.username}', callback=callback)
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