Re: Celery, pyramid_celery, SQLAlchemy, and ZopeTransactionExtension?

164 views
Skip to first unread message

John Anderson

unread,
Oct 9, 2012, 9:01:03 AM10/9/12
to pylons-...@googlegroups.com
On 10/09, Thomas Hill wrote:
> I know it's a really specific set of ingredients, but I was wondering if
> anyone has had any luck incorporating their pyramid app with celery, while
> using their SQLAlchemy connection that's a scoped_session with the
> ZopeTransactionExtension. I'm finding that when I put transaction.commit at
> the end of my celery tasks in order to save the changed entities, the
> entities are no longer available due to previous tasks having called
> transaction.commit and removing the ones in question from the session.
>
> I'd like to not have to create a sort of pyramid_tm for pyramid_celery;
> hopefully there's something here that I'm missing.
>
> Has anyone got any suggestions?
>
> -Thomas

I've never had any issues using zopetm + pyramid_celery but if you can come up with an example I can probably fix it.

Here is a dummy example that I tried reproducing the problem with but it all works just fine:

https://github.com/sontek/pyramid_celery/tree/master/examples/long_running_with_tm
Reply all
Reply to author
Forward
0 new messages