nutankumari / django-tasks

Automatically exported from code.google.com/p/django-tasks
0 stars 0 forks source link

Feature Request - Email notification of failure #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Guys, its been working well for me given my limited usage at this point.  It 
would be cool if django-tasks sent email notification when something finishes 
with error.

Austin

Original issue reported on code.google.com by godber on 23 Aug 2010 at 9:47

GoogleCodeExporter commented 8 years ago
Hi Austin,

we've added a Signal on task completion in r51

You can now connect your notification system on this Signal. 
The Signal will give you the task (so you can get the result) and the object 
instance as params. 
You can now use:

from djangotasks.signals import task_completed

def notification_callback(sender, **kwargs):
    print "Task finished!"

task_completed.connect(notification_callback)

See the changes in r51 and 
https://docs.djangoproject.com/en/1.3/topics/signals/ for more details ;)

Original comment by thomas.d...@gmail.com on 27 Sep 2011 at 6:16

GoogleCodeExporter commented 8 years ago
Cool, good solution, thanks!

Original comment by godber on 27 Sep 2011 at 6:50