class CallbackTask(Task):

    def on_success(self, retval, task_id, args, kwargs):
        pass

def on_failure(self, exc, task_id, args, kwargs, einfo):
    pass

@celery.task(base=CallbackTask)
def add(x, y):
    pass
Callback for celery apply_async