Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
self-reg-form
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bo-Chun Chen
self-reg-form
Commits
c001332b
Commit
c001332b
authored
2 years ago
by
Krish Moodbidri
Browse files
Options
Downloads
Patches
Plain Diff
added docstring for tasks.py
parent
c66196cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
added docstring for tasks.py
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks.py
+21
-0
21 additions, 0 deletions
tasks.py
with
21 additions
and
0 deletions
tasks.py
+
21
−
0
View file @
c001332b
...
...
@@ -57,6 +57,13 @@ def certify_gen_f(room):
return
callback
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
)
def
timeout_handler
(
signum
,
frame
):
...
...
@@ -67,6 +74,13 @@ def timeout_handler(signum, frame):
@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
'
]
...
...
@@ -86,6 +100,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
'
]
email
=
json
[
'
email
'
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment