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
user-reg-cleanup
Commits
dc9f82cb
Commit
dc9f82cb
authored
Mar 20, 2020
by
Mitchell Moore
Committed by
Krish Moodbidri
Apr 10, 2020
Browse files
Fix variable mismatch
parent
cd0cc98c
Changes
1
Hide whitespace changes
Inline
Side-by-side
run.py
View file @
dc9f82cb
...
@@ -34,10 +34,10 @@ def on_room():
...
@@ -34,10 +34,10 @@ def on_room():
@
socketio
.
on
(
'request account'
)
@
socketio
.
on
(
'request account'
)
def
request_account
(
json
,
methods
=
[
'GET'
,
'POST'
]):
def
request_account
(
json
,
methods
=
[
'GET'
,
'POST'
]):
print
(
time
.
strftime
(
"%m-%d-%Y_%H:%M:%S"
)
+
'
\t
Queue request received: '
+
str
(
json
))
print
(
time
.
strftime
(
"%m-%d-%Y_%H:%M:%S"
)
+
'
\t
Queue request received: '
+
str
(
json
))
sid
=
str
(
session
[
'uid'
])
room
=
str
(
session
[
'uid'
])
print
(
"Room: {}"
.
format
(
sid
))
print
(
"Room: {}"
.
format
(
room
))
try
:
try
:
tasks
.
celery_create_account
.
delay
(
json
[
'username'
],
json
[
'fullname'
],
json
[
'reason'
],
session
=
sid
)
tasks
.
celery_create_account
.
delay
(
json
[
'username'
],
json
[
'fullname'
],
json
[
'reason'
],
session
=
room
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
time
.
strftime
(
"%m-%d-%Y_%H:%M:%S"
)
+
"
\t
Error in account creation: "
,
e
)
print
(
time
.
strftime
(
"%m-%d-%Y_%H:%M:%S"
)
+
"
\t
Error in account creation: "
,
e
)
socketio
.
emit
(
"Account creation failed"
,
room
)
socketio
.
emit
(
"Account creation failed"
,
room
)
...
...
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