Hi,

I'm very puzzled, my web application on SQLAlchemy (PostgreSQL) has
always been working fine. However, in its auxiliary (Celery) process,
only reading works, writing is ignored.

In my Celery tasks.py, the DBSession is constructed as per doc --

from sqlalchemy.orm.session import sessionmaker
...
engine = engine_from_config(conf, 'sqlalchemy.')
DBSession = sessionmaker()
DBSession.configure(bind=engine)

Later during operation, both dbsession.commit() and dbsession.flush()
does nothing --

(Pdb) dbsession = DBSession()
(Pdb) dbsession
<sqlalchemy.orm.session.Session object at 0x9b89d2c>
(Pdb) dbsession.query(model.Person).filter_by(id=u'123').first()
<myapp.models.Person object at 0x9cf8d4c>
(Pdb) _person =
dbsession.query(model.Person).filter_by(id=u'123').first()
(Pdb) _person.name
(Pdb)
(Pdb) _person.name = u'Ken'
(Pdb) dbsession.commit()
(Pdb)     <- Nothing happens
(Pdb) _person.name
u'Ken'
(Pdb) dbsession.flush()
(Pdb)     <- Again nothing happens

What could have gone wrong? BTW, I'm using SQLAlchemy 0.7.2

Any pointer will be much appreciated!

Jerry

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to