Flask-SQLAlchemy: SQLALCHEMY_ENGINE_OPTIONS not set up correctly

前端 未结 1 1262
野的像风
野的像风 2021-01-20 00:32

I just updated my projects Flask-SQLAlchemy Version to the latest one (v2.4). As some of the SQL-Alchemy config parameters were deprecated, I now follow the documentation an

相关标签:
1条回答
  • 2021-01-20 00:46

    As you have already mentioned in the comment the problem was in the pool parameter.

    SQLAlchemy documentation specifies that an instance of Pool or QueuePool could be a pool parameter.

    The valid example is:

    SQLALCHEMY_ENGINE_OPTIONS = {
        'pool': QueuePool(creator),
        'pool_size': 10,
        'pool_recycle': 120,
        'pool_pre_ping': True
    }
    
    0 讨论(0)
提交回复
热议问题