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

Merge branch 'feat-linting' into 'fix-linting'

added docstring for tasks.py

See merge request louistw/self-reg-form!3
parents f3b314c4 c001332b
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,13 @@ def certify_gen_f(room):
def send_msg(event, room):
"""
This function is used to send messages via socketio
Input:
string event, room:
Output:
string: emit event to room
"""
socketio.emit(event, room=room)
......@@ -80,6 +87,13 @@ def send_msg(event, room):
@celery.task
def celery_create_account(json, session):
"""
This function is used to create account for new users
Input:
json: json object of all user attributes and session/room
Output:
gen_f(room): callback to check for success or failure
"""
room = session
username = json["username"]
email = json["email"]
......@@ -110,6 +124,13 @@ def celery_create_account(json, session):
@celery.task
def celery_certify_account(json, session):
"""
This function is used to certify account for existing users
Input:
json: json object of all user attributes and session/room
Output:
gen_f(room): callback to check for success or failure
"""
room = session
username = json["username"]
queuename = rc_util.encode_name(username)
......
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