mirror of https://github.com/JohnHammond/CTFd.git
Fix flask run by not monkey patching for gevent in wsgi.py (#1101)
* Fixes `flask run` debug server by not monkey patching in `wsgi.py` * Closes #1099bulk-clear-sessions
parent
3b1b82b9a0
commit
7a7595cf03
8
wsgi.py
8
wsgi.py
|
@ -1,8 +1,14 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Detect if we're running via `flask run` and don't monkey patch
|
||||||
|
if not os.getenv("FLASK_RUN_FROM_CLI"):
|
||||||
from gevent import monkey
|
from gevent import monkey
|
||||||
|
|
||||||
monkey.patch_all()
|
monkey.patch_all()
|
||||||
|
|
||||||
from CTFd import create_app
|
from CTFd import create_app
|
||||||
|
|
||||||
app = create_app()
|
app = create_app()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
app.run(debug=True, threaded=True, host="127.0.0.1", port=4000)
|
app.run(debug=True, threaded=True, host="127.0.0.1", port=4000)
|
||||||
|
|
Loading…
Reference in New Issue