[sqlalchemy] Re: Tutorial Issue

2010-10-01 Thread LucianU
I noticed that line but didn't think it was essential. It looked more of an aside thing, but it seems I was wrong. Anyway, I'm glad I brought it up because someone else could have made the same mistake. Thank you for your answer. On Sep 30, 5:16 pm, Michael Bayer mike...@zzzcomputing.com wrote:

[sqlalchemy] Passing model objects to other threads

2010-10-01 Thread James
Hi all, i'm using SQLAlchemy in a TG2 web app which has long-running jobs kicked off by user POSTs. I'm planning on writing the pending jobs to the DB, then kick off a threading.Thread at the end of the web app method to actually do the work. Question - I'll need to pass the job description (a

[sqlalchemy] Re: Passing model objects to other threads

2010-10-01 Thread NiL
Hi, have you considered using TGScheduler ? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com.

[sqlalchemy] Re: Passing model objects to other threads

2010-10-01 Thread James
Hi, Yes I was going to have TGScheduler run at intervals to complete any jobs that fail the first time round (as they might, for reasons I can't control). However, the initial job run is reasonably time-sensitive, so I would like it to get started right as the user POSTs the instructions; but I

Re: [sqlalchemy] Passing model objects to other threads

2010-10-01 Thread Michael Bayer
On Oct 1, 2010, at 9:40 AM, James wrote: Hi all, i'm using SQLAlchemy in a TG2 web app which has long-running jobs kicked off by user POSTs. I'm planning on writing the pending jobs to the DB, then kick off a threading.Thread at the end of the web app method to actually do the work.

[sqlalchemy] appropriate place for before insert

2010-10-01 Thread Landreville
I need to make a call to an external system (through SOAP) when a new object is saved/updated/deleted. If the external call fails then I would like the save to also fail. I have looked at the documentation and a MapperExtension cannot change the flush plan to cancel if the external call fails. I

Re: [sqlalchemy] appropriate place for before insert

2010-10-01 Thread Michael Bayer
On Oct 1, 2010, at 12:30 PM, Landreville wrote: I need to make a call to an external system (through SOAP) when a new object is saved/updated/deleted. If the external call fails then I would like the save to also fail. I have looked at the documentation and a MapperExtension cannot change

[sqlalchemy] Re: appropriate place for before insert

2010-10-01 Thread Landreville
On Oct 1, 12:54 pm, Michael Bayer mike...@zzzcomputing.com wrote: Any extension, mapper or session, can cancel the operation overall by raising an exception, which will result in halting the flush and issuing a ROLLBACK.   Usually, if something goes wrong inside of a transaction, the whole

[sqlalchemy] Building queries programmatically

2010-10-01 Thread Edward Williams
Hi, I'm working on an application where queries are created completely by the user. (The goal is to make it easy for the user). Because of this I have to support dynamic query creation and manipulation. My current model has a query class with my own created specification for queries which is