Class based Task in django celery
问题 I am using this class to push notification via celery. The class definition goes like this. from celery import Task class NotifyUser(Task): """ send push notification, entry point for this purpose is def send_notification() """ def __init__(self, users=None, notification_code=None, context=None, merchant_flag=False, listing_flag=False, object_type=None, object_id=None, category_id=None, *args, **kwargs): Task.__init__(self, *args, **kwargs) self.notification_code = notification_code self