|
|
@ -25,15 +25,21 @@ if sys.path[0] != os.path.dirname(os.path.realpath(__file__)): |
|
|
|
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) |
|
|
|
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def try_eventlet(): |
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
import eventlet |
|
|
|
|
|
|
|
eventlet.monkey_patch() |
|
|
|
|
|
|
|
except Exception as e: |
|
|
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|
import eventlet |
|
|
|
|
|
|
|
eventlet.monkey_patch() |
|
|
|
|
|
|
|
try: |
|
|
|
try: |
|
|
|
|
|
|
|
try_eventlet() |
|
|
|
socketio.run(app) |
|
|
|
socketio.run(app) |
|
|
|
# app.run(debug=True) |
|
|
|
# app.run(debug=True) |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: |
|
|
|
pass |
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
if __name__ == '__main__': |
|
|
|
|
|
|
|
|
|
|
|
main() |
|
|
|
main() |
|
|
|