Skip to content
Snippets Groups Projects
Commit 151ac02e authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Fix flake8 issue of tasks.py

./tasks.py:75:36: F821 undefined name 'errmsg'
    socketio.emit("account error", errmsg, room=room)
                                   ^
./tasks.py:75:49: F821 undefined name 'room'
    socketio.emit("account error", errmsg, room=room)
                                                ^
./tasks.py:100:80: E501 line too long (87 > 79 characters)
    rc_util.add_account(username, queuename, email, fullname, reason, updated_by, host)
parent 2d9c942c
No related branches found
No related tags found
No related merge requests found
......@@ -70,11 +70,11 @@ def send_msg(event, room):
socketio.emit(event, room=room)
def timeout_handler(signum, frame):
print("Process timeout, there's might some issue with agents")
socketio.emit("account error", errmsg, room=room)
rc_util.rc_rmq.stop_consume()
rc_util.rc_rmq.delete_queue()
#def timeout_handler(signum, frame):
# print("Process timeout, there's might some issue with agents")
# socketio.emit("account error", errmsg, room=room)
# rc_util.rc_rmq.stop_consume()
# rc_util.rc_rmq.delete_queue()
@celery.task
......@@ -97,7 +97,9 @@ def celery_create_account(json, session):
)
send_msg("creating account", room)
print(username)
rc_util.add_account(username, queuename, email, fullname, reason, updated_by, host)
rc_util.add_account(
username, queuename, email, fullname, reason, updated_by, host
)
print("sent account info")
print("Waiting for completion...")
rc_util.consume(
......
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