I have a basic query that I run over and over at each 2 minutes to extract all records that have a flag set to 1/true etc.
If I run the script from the command and I have a record with the flag set it extracts it then, if I go to mysql directly and re-set that flag to true/1 the next time (2 minutes) the query is executed the record is not found.
I have enabled the queries executed to be printed out to my console and if I execute the query directly into mysql I can see the record showing up. Why isnt sqlalchemy finding it?
Here’s my config:
engine = create_engine( config.DATABASE_URI, pool_recycle=1800 )
metadata = MetaData()
db_session = scoped_session( sessionmaker( bind = engine,
autoflush = True,
autocommit = False ) )
The problem may be related to the scoped session. With this type of session, a session is bind to every server thread.. what framework are you using?