Skip to content
Snippets Groups Projects
Commit e35ad880 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

removed extra whitespaces and additional lines

parent 0598349b
No related branches found
No related tags found
No related merge requests found
Pipeline #4568 canceled with stage
...@@ -7,9 +7,7 @@ import vars ...@@ -7,9 +7,7 @@ import vars
from flask import session from flask import session
from flask_socketio import SocketIO, join_room from flask_socketio import SocketIO, join_room
from app import create_app from app import create_app
from gevent import monkey from gevent import monkey
monkey.patch_all(subprocess=True) monkey.patch_all(subprocess=True)
...@@ -18,18 +16,14 @@ app = create_app(config_name) ...@@ -18,18 +16,14 @@ app = create_app(config_name)
app.config['SECRET_KEY'] = vars.key app.config['SECRET_KEY'] = vars.key
socketio = SocketIO(app, message_queue= vars.message_queue) socketio = SocketIO(app, message_queue= vars.message_queue)
@socketio.on('join_room') @socketio.on('join_room')
def on_room(json): def on_room(json):
room = str(session['uid']) room = str(session['uid'])
referrer = json['referrer'] referrer = json['referrer']
join_room(room) join_room(room)
print('\t\t\t|-----Room ID: ' + room) print('\t\t\t|-----Room ID: ' + room)
print('\t\t\t|-----Referrer: ' + referrer) print('\t\t\t|-----Referrer: ' + referrer)
@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") + '\tQueue request received: ' + str(json)) print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json))
...@@ -41,6 +35,5 @@ def request_account(json, methods=['GET', 'POST']): ...@@ -41,6 +35,5 @@ def request_account(json, methods=['GET', 'POST']):
print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account creation: ", e) print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account creation: ", e)
socketio.emit("Account creation failed", room) socketio.emit("Account creation failed", room)
if __name__ == '__main__': if __name__ == '__main__':
socketio.run(app, host='0.0.0.0') socketio.run(app, host='0.0.0.0')
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