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

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 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
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-04-30 Thread Michael Merickel
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 separate process and so there is no conflict between these rendering environments despi

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

2014-04-30 Thread Jonathan Vanasco
We've run into an annoying edge-case with our use of BeforeRender. Our app utilizes BeforeRender to optimize priming/loading our object cache and data standardization. It's awesome and works great. We recently noticed some odd bugs and a general slowness from caches that weren't primed proper