pyramid_celery
pyramid_celery copied to clipboard
line 14 in tasks.py in the demo app makes assumptions about the db which may not be valid for an async task
with two instances of pceleryd running, wild clicking on "delete" links in the web interface made it possible to schedule multiple delete-tasks for the same TaskItem, which resulted in an exception in the task (IndexError when trying to get the first item of an empty query) and in an BrokenPipe error in the web app server . While this is a minor bug, I think it would be a good thing to promote correct handling of asynchronous code in this demo app.
btw: running two instances of pceleryd has nothing to do with this issue. "wild clicking" is enough to reproduce the behaviour.
Yeah, I should probably clean the app up to show how to handle everything properly. I built it just as a sample to see how configuration of pyramid_celery was done. I'll clean up the demo tomorrow and push updates.
Thanks for the report