Created
March 22, 2016 15:24
-
-
Save yevgnenll/913cc3e5435a142b90da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models.signals import post_save | |
from django.dispatch import receiver | |
from socials.models import Keyword | |
from socials.tasks import SocialsCrawlAllTask | |
@receiver(post_save, sender=Keyword) | |
def post_save_keyword(sender, instance, created, **kwargs): | |
if created: | |
task = SocialsCrawlAllTask() | |
task.delay(instance.id) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment