django-celery

How can I run a celery periodic task from the shell manually?

How can I run a celery periodic task from the shell manually? Question: I’m using celery and django-celery. I have defined a periodic task that I’d like to test. Is it possible to run the periodic task from the shell manually so that I view the console output? Asked By: Mridang Agarwalla || Source Answers: …

Total answers: 3

Retry Celery tasks with exponential back off

Retry Celery tasks with exponential back off Question: For a task like this: from celery.decorators import task @task() def add(x, y): if not x or not y: raise Exception(“test error”) return self.wait_until_server_responds( if it throws an exception and I want to retry it from the daemon side, how can apply an exponential back off algorithm, …

Total answers: 3

using class methods as celery tasks

using class methods as celery tasks Question: I’m trying to use the methods of class as the django-celery tasks, marking it up using @task decorator. The same situation is discribed here, asked by Anand Jeyahar. It’s something like this class A: @task def foo(self, bar): … def main(): a = A() … # what i …

Total answers: 5

How to check task status in Celery?

How to check task status in Celery? Question: How does one check whether a task is running in celery (specifically, I’m using celery-django)? I’ve read the documentation, and I’ve googled, but I can’t see a call like: my_example_task.state() == RUNNING My use-case is that I have an external (java) service for transcoding. When I send …

Total answers: 13

Detect whether Celery is Available/Running

Detect whether Celery is Available/Running Question: I’m using Celery to manage asynchronous tasks. Occasionally, however, the celery process goes down which causes none of the tasks to get executed. I would like to be able to check the status of celery and make sure everything is working fine, and if I detect any problems display …

Total answers: 9