Objects created from celery task not firing django post_save signal

Viewed 177

I have a celery task that creates a modal object. I'm trying to run some code after the object is created using django post_save signal. but for some reason, the signals are not firing.

models.py

class Alert(models.Model):
    description = models.TextField()


@receiver(post_save, sender=Alert, dispatch_uid="create_jira_issue")
def create_issue(sender, instance, **kwargs):
    //do something here
    

tasks.py

@shared_task
def create_alert():
    Alert.objects.create()

this is how the code looks like. the Objects are being created through the celery task. but it's not triggering the post_save signal. any input is appreciated.

0 Answers
Related