Re: [pylons-discuss] advice sought on 'BeforeRender' and 'render' edge case.

2014-05-01 Thread Jonathan Vanasco
On Thursday, May 1, 2014 12:52:17 AM UTC-4, Michael Merickel wrote: > > It sounds like you'll be interested in subscriber predicates. > > > http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/hooks.html#subscriber-predicates > > Personally I send emails from message queue in a separ

Re: [pylons-discuss] advice sought on 'BeforeRender' and 'render' edge case.

2014-05-01 Thread Michael Merickel
I'm using PostgreSQL's internal NOTIFY/LISTEN semantics in a custom message queue over a BackgroundJob table. It's been fantastic for not requiring an external queue and maintaining transactional semantics. Just fire off request.enqueue_job('mailer', 'send_account_invitation', {'email': ' f...@exa

Re: [pylons-discuss] advice sought on 'BeforeRender' and 'render' edge case.

2014-05-01 Thread Jonathan Vanasco
Understood. We use PostgreSQL as the default messaging queue for development configurations. Less moving parts than also running Redis (which is in production / staging and what the backend devs and contractors use locally). It works, but I wouldn't want to put it into production. Our proje

Re: [pylons-discuss] advice sought on 'BeforeRender' and 'render' edge case.

2014-05-01 Thread Jonathan Vanasco
i need to ship, so am cutting a corner. I came up with this quick snippet to provide eventless rendering until there's time for a proper solution. it just loops together the `render()` and `RendererHelper.render()` functionality. https://gist.github.com/jvanasco/e39fe984015a25e9aa33 -- You

[pylons-discuss] Re: How to store session data server side?

2014-05-01 Thread wilk
On 30-04-2014, Bert JW Regeer wrote: About _session_id of pyramid_pluggable_session > That is why it has an underscore prepended, this makes it an internal > = > value that can not be relied on, unless you always use my session = > package. The nice thing is that with mine you can keep using it,

Re: [pylons-discuss] How to store session data server side?

2014-05-01 Thread Bert JW Regeer
On May 1, 2014, at 12:39 , wilk wrote: > On 30-04-2014, Bert JW Regeer wrote: > > About _session_id of pyramid_pluggable_session > >> That is why it has an underscore prepended, this makes it an internal >> = >> value that can not be relied on, unless you always use my session = >> package. T

[pylons-discuss] Re: How to store session data server side?

2014-05-01 Thread wilk
On 01-05-2014, Bert JW Regeer wrote: > > --Apple-Mail=_8BFE3C8B-DFF0-491C-A72C-E7137EA10853 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=iso-8859-1 > > > On May 1, 2014, at 12:39 , wilk wrote: > >> On 30-04-2014, Bert JW Regeer wrote: >>=20 >> About _se