djangosnippets.org: Latest snippets tagged with 'celery'https://djangosnippets.org/tags/celery/2013-12-11T15:47:24.581181-06:00Decorator to execute a method only once
2013-12-11T15:47:24.581181-06:00atodorov-otbhttps://djangosnippets.org/snippets/3010/<p>Beware if using Amazon Simple Queue Service to execute Celery tasks which send email messages! Sometimes SQS messages are duplicated which results in multiple copies of the messages being sent. This is a simple decorator which uses a cache backend to prevent the task from executing twice in a specified …</p>
Freely redistributableDjango-Celery Progress Bar backend
2013-02-28T04:51:31.894969-06:00fsfsfshttps://djangosnippets.org/snippets/2898/<p>This is my POC code for a progress bar backend (for delivering JSON to some AJAX frontend) in Django using Django-Celery (with RabbitMQ). It is quite concise, yet it took me a while to get there because Celery's Documentation is IMHO rather puristic. Web development is meant to be copy-paste! …</p>
Freely redistributableTaskViewMixin, fires off a task and polls until completion
2011-08-01T20:25:02.920191-05:00zbyte64https://djangosnippets.org/snippets/2500/<p>TaskViewMixin can be mixed in with a Class Based view and handles the scheduling and polling of a task. During task execution, a waiting page is rendered that should refresh itself. Once the task is complete, the view may then render a success page and can collect the payload of …</p>
Freely redistributable