Galio

galio 开发进度

  1. pycharm 报错

may have been in progress in another thread when fork() was called”
在环境变量中增加
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

  1. Flask SocketIO 关闭debug日志
    socketio = SocketIO(
     app,
     # engineio_logger=log.logger if env_util.is_dev() else False,
     engineio_logger=False,
     logger=False,
     cors_allowed_origins='*',
    )
    
    关闭debug模式,用gevent启动,不会打印日志。启动命令:
    gunicorn -w 4 -b 0.0.0.0:8010 --limit-request-line 0 --limit-request-field_size 0 --pid pid.log -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker --timeout 120 app:app

参考文档https://flask-socketio.readthedocs.io/en/latest/#deployment

  1. template 页面刷不出来

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.