Re: [sqlalchemy] Session query on different server is not returning an object

2012-08-29 Thread Jakob D.
Yeah, sounds very reasonable, my first thought was to isolate a session to each subprocess. The only reason I thought about working with detached objects is because I'm having trouble reproducing the problem, and I thought if I worked clean sessions, these problems shouldn't occur. Thanks

Re: [sqlalchemy] Session query on different server is not returning an object

2012-08-28 Thread Jakob D.
Shouldn't open transactions within the session close when I issue a session.remove() I've also tried combinations of close, rollback and commit. I do not work towards the cacheing in this service. Does an open transaction mean I cannot issue any queries at all before closing them? Because when

Re: [sqlalchemy] Session query on different server is not returning an object

2012-08-28 Thread Michael Bayer
On Aug 28, 2012, at 2:54 AM, Jakob D. wrote: Shouldn't open transactions within the session close when I issue a session.remove() yes. Does an open transaction mean I cannot issue any queries at all before closing them? You can issue as many queries as you want at any time. the

[sqlalchemy] Session query on different server is not returning an object

2012-08-27 Thread Jakob D.
Hi! I have a problem and I cannot figure out whats wrong. I thought might get some ideas here. On one server a Project instance is committed, and I know for sure it's in the db. But on another server querying that object returns None: Project.query.filter_by(id=project_id).first() The scoped