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
rc
self-reg-form
Commits
e35ad880
Commit
e35ad880
authored
Apr 23, 2021
by
Krish Moodbidri
Browse files
removed extra whitespaces and additional lines
parent
0598349b
Changes
1
Hide whitespace changes
Inline
Side-by-side
run.py
View file @
e35ad880
...
...
@@ -7,9 +7,7 @@ import vars
from
flask
import
session
from
flask_socketio
import
SocketIO
,
join_room
from
app
import
create_app
from
gevent
import
monkey
monkey
.
patch_all
(
subprocess
=
True
)
...
...
@@ -18,18 +16,14 @@ app = create_app(config_name)
app
.
config
[
'SECRET_KEY'
]
=
vars
.
key
socketio
=
SocketIO
(
app
,
message_queue
=
vars
.
message_queue
)
@
socketio
.
on
(
'join_room'
)
def
on_room
(
json
):
room
=
str
(
session
[
'uid'
])
referrer
=
json
[
'referrer'
]
join_room
(
room
)
print
(
'
\t\t\t
|-----Room ID: '
+
room
)
print
(
'
\t\t\t
|-----Referrer: '
+
referrer
)
@
socketio
.
on
(
'request account'
)
def
request_account
(
json
,
methods
=
[
'GET'
,
'POST'
]):
print
(
time
.
strftime
(
"%m-%d-%Y_%H:%M:%S"
)
+
'
\t
Queue request received: '
+
str
(
json
))
...
...
@@ -41,6 +35,5 @@ def request_account(json, methods=['GET', 'POST']):
print
(
time
.
strftime
(
"%m-%d-%Y_%H:%M:%S"
)
+
"
\t
Error in account creation: "
,
e
)
socketio
.
emit
(
"Account creation failed"
,
room
)
if
__name__
==
'__main__'
:
socketio
.
run
(
app
,
host
=
'0.0.0.0'
)
Write
Preview
Markdown
is supported
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