Open GabLeRoux opened 7 years ago
For now, you could create a project-wide function called tasks.email_result
or custom_hooks.email_result
and call your send-email there; similar to what's mentioned here - https://django-q.readthedocs.io/en/latest/examples.html#reports
Hi,
I'm using
django-q
in a medium size project where I enqueue tasks for processing things like file generation, email sending and other common actions and it works quite well 👍In these enqueued tasks, I have a few ones that are actually critical for the project. I didn't have to monitor anything from it, but now that it's critical, the team needs to be notified when something goes wrong. For example, if I fail to generate a file or if an unknown exception happens in one of the workers, we need to send an email.
What would be the recommended way to deal with error notifications with django-q?
I see I can setup rollbar which could be a solution, but what if I'd like a custom email template?
I see there was some signals added in
v0.8.0
, but only signals available are "Before enqueuing a task" and "Before executing a task".Is there some safe and/or recommended place for executing code with the failed task passed as a paremeter after all of its retry has failed?
My setup is quite simple:
qcluster
supervised bysupervisor
v0.7.17
We'll do a round of tests shortly and see if we can updatedjango-q
safelyI searched for this a bit and I've found
I first though of using django's error email sending, but I can't seem to find how to make django-q use it. According to this Stackoverflow question, celery seems to support this.
Do you guys have any suggestions or things you've done to handle this?