Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Krish Moodbidri
self-reg-form
Commits
c001332b
Commit
c001332b
authored
May 24, 2022
by
Krish Moodbidri
Browse files
added docstring for tasks.py
parent
c66196cf
Pipeline
#6193
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tasks.py
View file @
c001332b
...
@@ -57,6 +57,13 @@ def certify_gen_f(room):
...
@@ -57,6 +57,13 @@ def certify_gen_f(room):
return
callback
return
callback
def
send_msg
(
event
,
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
)
socketio
.
emit
(
event
,
room
=
room
)
def
timeout_handler
(
signum
,
frame
):
def
timeout_handler
(
signum
,
frame
):
...
@@ -67,6 +74,13 @@ def timeout_handler(signum, frame):
...
@@ -67,6 +74,13 @@ def timeout_handler(signum, frame):
@
celery
.
task
@
celery
.
task
def
celery_create_account
(
json
,
session
):
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
room
=
session
username
=
json
[
'username'
]
username
=
json
[
'username'
]
email
=
json
[
'email'
]
email
=
json
[
'email'
]
...
@@ -86,6 +100,13 @@ def celery_create_account(json, session):
...
@@ -86,6 +100,13 @@ def celery_create_account(json, session):
@
celery
.
task
@
celery
.
task
def
celery_certify_account
(
json
,
session
):
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
room
=
session
username
=
json
[
'username'
]
username
=
json
[
'username'
]
email
=
json
[
'email'
]
email
=
json
[
'email'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment