Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery marks all output as warning

Tags:

python

celery

Why does Celery marks all output as warning? For example:

[2012-09-30 16:41:10,718: WARNING/MainProcess] celery@dev-maven has started.
[2012-09-30 16:41:49,219: INFO/MainProcess] Got task from broker: project_reindex.reindex_updated_projects[df28cd38-7582-445b-921b-228ee7570d9f]
[2012-09-30 16:41:52,761: WARNING/PoolWorker-1] Project 51144 indexed.

How can I configure it?

Update:

OS - Ubuntu 10.04

Celery 3.0.7 (Chiastic Slide)

Message broker - RabbitMQ

like image 479
Gryzz Avatar asked Sep 30 '12 19:09

Gryzz


People also ask

What is celery result backend?

Celery uses a result backend to keep track of the tasks' states. In the previous tutorial, we saw how Celery works and how to integrate it into a Django application. In this tutorial, we are going to use the RPC (RabbitMQ/AMQP) result backend to store and retrieve the states of tasks.

Does celery run tasks in parallel?

Celery task canvas Demonstration of a task which runs a startup task, then parallelizes multiple worker tasks, and then fires-off a reducer task.


1 Answers

Output from stdout and stderr is redirected to the logger, and the default log level is warning. You can configure the level or disable the redirection altogether using the worker_redirects_stdouts_level and worker_redirects_stdouts settings:

https://docs.celeryproject.org/en/latest/userguide/configuration.html#worker-redirect-stdouts

These settings were CELERY_REDIRECT_STDOUTS_LEVEL & CELERY_REDIRECT_STDOUTS in earlier versions.

like image 80
asksol Avatar answered Nov 01 '22 16:11

asksol