问题
We are using the Flask development server which I know we need to change. It seems that when two requests come in very close to each other bad things happen. On one of those occasions we got this error upon commit:
sqlalchemy.exc.InvalidRequestError: Object '<SomeClass at 0x7fca30277b38>' is already attached to session '41' (this is '42')
I know that there should be one FlaskSQLAlchemy session per request. Would this error imply that processing of the second request changed the session? What would be the best way to verify this hypothesis?
来源:https://stackoverflow.com/questions/61762310/what-could-cause-the-flasksqlalchemy-session-to-change