pyramid_celery icon indicating copy to clipboard operation
pyramid_celery copied to clipboard

transaction support

Open jvanasco opened this issue 12 years ago • 4 comments

it would be great if this supported joining the pyramid_tm transaction

for example, if I call something an async task, it could defer sending the request to the broker until the transaction commits.

jvanasco avatar Apr 14 '14 21:04 jvanasco

Here is an example how Warehouse does it:

https://github.com/pypa/warehouse/blob/0f168c8da2e982155e0c3e90d1c5856fffce0d4f/warehouse/celery.py

I was looking for to integrate this to pyramid_celery, though I am still a bit Celery noob.

miohtama avatar Aug 19 '15 08:08 miohtama

That task doesn't actually do it yet, I haven't pushed and merged in that PR for that yet. Currently all that task does is wrap each task in it's own pyramid_tm controlled, transaction and pass a Pyramid request into the tasks to get access to things attached to the request.

dstufft avatar Aug 19 '15 14:08 dstufft

here's a project that handles this

https://github.com/petrilli/pyramid_transactional_celery

jvanasco avatar Apr 06 '16 22:04 jvanasco

Here is another implementation: https://websauna.org/narrative/misc/task.html

miohtama avatar Apr 07 '16 18:04 miohtama