Where is the data provided by django-celery urls stored? How long is the data available? And what is the memory consumption?
I am starting a project using django celery and I am making ajax calls to the task urls provided by 'djcelery.urls'.
I would like to know a few things about this data:
Where is that information being stored? Is it called from the djcelery tables in my django projects database or is it kept on the RabbitMQ server? My understanding of the djcelery tables in my database is that they are only for monitoring the usage using the camera.
If it is being stored on the RabbitMQ server, how long will the tasks status report be available? How much memory does this data consume?
Do I need to flush the task status reports periodically to prevent a memory leak? How would this开发者_如何学Python be done? By restarting the rabbitmq server?
Thanks.
The results are stored in the CELERY_RESULT_BACKEND, which is disabled by default.
You can get the result of a task by creating a new celery.result.AsyncResult with the appropriate task_id
: How do I get the result of a task if I have the ID that points there?.
Unless you set CELERY_AMQP_TASK_RESULT_EXPIRES, tasks will never expire. You can manually remove the result of a task using AsyncResult.forget().
精彩评论