» Turn off Celery task delay on development server
Turn off Celery task delay on development server
|September 29, 2014
Posted by forumadmin
I’m using Celery on Heroku with RabbitMQ and the following settings:
DEFAULT_AMQP = "amqp://guest:guest@localhost//"
BROKER_URL = os.getenv('CLOUDAMQP_URL', DEFAULT_AMQP)
CELERY_TASK_SERIALIZER = 'pickle'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ENABLE_UTC = True
CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True
CELERY_RESULT_BACKEND = False
BROKER_POOL_LIMIT = 5
# trying to clean up this memory leak
CELERYD_MAX_TASKS_PER_CHILD = 5
CELERYD_TASK_TIME_LIMIT = 60*10 # time limit in seconds--watch if we end up throwing big tasks onto this
I generally call tasks using
On Heroku, I’d have to provision a separate worker dyno to handle these queued processes. For the development server, I’d like to still call my delayed tasks, but do it in the same thread rather than defer it to a worker queue. This means that every time I call
.delay(), on the staging server, I want not to delay the task but actually just to call it as if I had used the normal
Is there a Celery setting or some other way that I can basically turn Celery off and have calls to
.delay() pass to
More Related Questions
- Shared XMPP connection between Celery workers My web app needs to be able to send XMPP messages (Facebook Chat), and I thought Celery might be a good solution for this. A task would consist of querying the database and sending the […]
- Celery multi with queues set up not receiving tasks from django I am running my workers with the following command:
celery -A myapp multi start 4 -l debug -Q1:3 queue1,queue2 -Q:4 queue3
The workers start out very well so when i run
- Understanding difference between celery and celery milti? When I run Celery with one worker with celery worker -A myapp -l info, everything is fine, tasks are performed.
But when I run celery multi start 2 -Q:1 message_send -Q:2 message_manager […]
- Cancel an already executing task with Celery? I am new to Django and Celery. I have been reading the doc and searching but cannot seem to find a straight answer:
Can you cancel an already executing task? (as in the task has started, […]
- How to force import a lib from python site-package? I am using custom django struct as below:
all settings file in conf, all app in src
and need use below manage.py:
if __name__ == "__main__":
ROOT_PATH = […]
- How to apply Celery signals to a group of tasks I want to do some processing before and after a group of tasks is run. I know I can connect a single task to task_prerun and task_postrun signals, but I'm using task.chunks and need to […]
- Appropriate approach for MQ tasks in Django I'm wondering what criteria would need to be considered when we need to use some kind of task queue in a django project, I'm thinking in performace, development speed, flexibility, […]
- Best Practices for running celery on heroku Lets say I have the following processes declared in my Procfile
web: newrelic-admin run-program python manage.py run_gunicorn -b 0.0.0.0:$PORT -w 9 -k gevent --max-requests 250 --preload […]
- Monitoring with Celery Flower Since Celery docs recommends using flower for monitoring, I am trying to get it to work with a hosted RabbitMQ provider (CloudAMQP)
celery flower […]
- Whats the advantage of using celery with rabbitmq over Redis, MongoDB or Django ORM) Is there a speed advantage, functionality advantage?
Also using Django ORM (mysql), is it a lot slower than using rabbitmq, mongodb or redis?
Im currently hosting on webfaction, and […]