ruslanmv commited on
Commit
e1c798c
1 Parent(s): 70142d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  from flask import Flask, render_template, request
2
  from flask_socketio import SocketIO, emit, join_room, leave_room
3
  import backend # Import backend functions
@@ -5,16 +8,11 @@ import matplotlib.pyplot as plt
5
  import base64
6
  from io import BytesIO
7
  import random
8
- import eventlet
9
  import logging
10
- # Force eventlet to be used as the async mode for Flask-SocketIO
11
- eventlet.monkey_patch()
12
  # Configure the logging level
13
- logging.getLogger('socketio').setLevel(logging.ERROR)
14
- logging.getLogger('engineio').setLevel(logging.ERROR)
15
  logging.getLogger('eventlet.wsgi.server').setLevel(logging.ERROR)
16
  # Suppress eventlet logs
17
- logging.getLogger('eventlet.wsgi.server').setLevel(logging.ERROR)
18
  eventlet.wsgi.logger = None # Disable eventlet's logging
19
  app = Flask(__name__)
20
  app.config['SECRET_KEY'] = 'your_secret_key'
@@ -158,4 +156,4 @@ def reset_quiz():
158
  participant["score"] = 0
159
 
160
  if __name__ == '__main__':
161
- socketio.run(app, host='0.0.0.0', port=7860, debug=True, log_output=False)
 
1
+ import eventlet
2
+ # Force eventlet to be used as the async mode for Flask-SocketIO
3
+ eventlet.monkey_patch()
4
  from flask import Flask, render_template, request
5
  from flask_socketio import SocketIO, emit, join_room, leave_room
6
  import backend # Import backend functions
 
8
  import base64
9
  from io import BytesIO
10
  import random
 
11
  import logging
12
+
 
13
  # Configure the logging level
 
 
14
  logging.getLogger('eventlet.wsgi.server').setLevel(logging.ERROR)
15
  # Suppress eventlet logs
 
16
  eventlet.wsgi.logger = None # Disable eventlet's logging
17
  app = Flask(__name__)
18
  app.config['SECRET_KEY'] = 'your_secret_key'
 
156
  participant["score"] = 0
157
 
158
  if __name__ == '__main__':
159
+ socketio.run(app, host='0.0.0.0', port=7860, debug=True)