EndPointCorp / end-point-blog

End Point Dev blog
https://www.endpointdev.com/blog/
17 stars 65 forks source link

Comments for Debugging Celery Tasks in Django Projects #578

Open phinjensen opened 6 years ago

phinjensen commented 6 years ago

Comments for https://www.endpointdev.com/blog/2012/03/debugging-celery-tasks-in-django/ By Greg Davidson

To enter a comment:

  1. Log in to GitHub
  2. Leave a comment on this issue.
phinjensen commented 6 years ago
original author: Jon Jensen
date: 2012-03-27T12:49:48-04:00

Great overview of all the pieces, Greg!

I was wondering on celerycam: If you only infrequently have it update the Django admin (say, every 5 minutes instead of every few seconds), will it miss any information? That is, does any of the status information "fall off" the queue entirely so you have no idea how a job finished up?

Or will the information all be there but just less current when looking in Django?

phinjensen commented 6 years ago
original author: Greg Davidson
date: 2012-03-27T13:27:04-04:00

With a more infrequent interval, the information would still be there but would be less current. You might miss the "received" and "started" status for tasks but would still see the success or failure when the task completes.

phinjensen commented 6 years ago
original author: Anonymous
date: 2012-07-14T05:27:43-04:00

rolling your own asynchronous task processing daemon is not difficult - task writes dictionary to nosql store, task picks them up. You have transparency, you have gevent for genuine I/O parallelism - "written in erlang" what a joke.

phinjensen commented 6 years ago
original author: Anthony Honstain
date: 2014-04-04T19:34:45-04:00

This post was extremely helpful, thank you! I really appreciated how you described (along with pictures) your task development process.

phinjensen commented 6 years ago
original author: Greg Davidson
date: 2014-04-05T01:12:37-04:00

Glad you found it helpful Anthony!

phinjensen commented 6 years ago
original author: Andy Fan
date: 2016-04-23T02:54:44-04:00

hi Greg: currently I run into an issue that the celerycam capture and logged all the parameter of a task, which is not what I want.

Like flower, it has a ability that to disable some sensitive data. http://flower.readthedocs.org/en/latest/config.html#format-task

but do you know if we have something similar in celerycam?

Thank you!

phinjensen commented 6 years ago
original author: Greg Davidson
date: 2016-04-26T11:00:39-04:00

@Andy: you'd have to try this to be sure but you can create a custom logger for your task. See the Celery docs on logging for more info.