Re: [sqlalchemy] One-off listeners

2013-11-26 Thread George Sakkis
On Monday, 25 November 2013 17:27:02 UTC+2, Michael Bayer wrote: On Nov 25, 2013, at 9:00 AM, George Sakkis george...@gmail.comjavascript: wrote: Hi all, is there a feature or pattern for adding a listener that is to be executed (at most) once? For example, say you want to send

Re: [sqlalchemy] One-off listeners

2013-11-26 Thread Michael Bayer
On Nov 26, 2013, at 3:41 AM, George Sakkis george.sak...@gmail.com wrote: On Monday, 25 November 2013 17:27:02 UTC+2, Michael Bayer wrote: On Nov 25, 2013, at 9:00 AM, George Sakkis george...@gmail.com wrote: Hi all, is there a feature or pattern for adding a listener that is

[sqlalchemy] One-off listeners

2013-11-25 Thread George Sakkis
Hi all, is there a feature or pattern for adding a listener that is to be executed (at most) once? For example, say you want to send an email when user is created and the session is committed. If event.listen() supported a once boolean parameter, this could be expressed as: def

Re: [sqlalchemy] One-off listeners

2013-11-25 Thread Michael Bayer
On Nov 25, 2013, at 9:00 AM, George Sakkis george.sak...@gmail.com wrote: Hi all, is there a feature or pattern for adding a listener that is to be executed (at most) once? For example, say you want to send an email when user is created and the session is committed. If event.listen()