Monday 15 September 2014

python - Sqlalchemy connection don't see new rows in db -



python - Sqlalchemy connection don't see new rows in db -

i have app nginx+uwsgi+django+postgresql utilize sqlalchemy (psycopg2 dialect) queries

engine = create_engine(...) engine.execute(select_statement)

and have separate script write db cron job. sqlalchemy connection don't see new rows. script write db using django orm. tried add together transaction.commit() after writing tod b, it's not help.

sqlalchemy see new rows after restarting uwsgi processes (kill && start, touch-reload not help). tried add together pool_recycle=60 param create_engine, tested different isolation levels (read uncomitted too), not help too... don't know how prepare this. help.

ps. tried connect using psycopg2 , correct, rows selected. tried utilize sessions, autocommit, explicitly commit session ... none of has helped.

python sql django postgresql sqlalchemy

No comments:

Post a Comment