extract split_quoted() into utils.py
[mygpo.git] / mygpo / data / signals.py
blobae0bc1d52cc52450709e245ea218f8b7b88102e1
1 from django.dispatch import receiver
3 from mygpo.pubsub.signals import subscription_updated
4 from mygpo.data.tasks import update_podcasts
6 import logging
7 logger = logging.getLogger(__name__)
10 @receiver(subscription_updated, dispatch_uid='update_podcast-pubsub')
11 def update_podcast(sender, **kwargs):
12 """ update podcast in background when receiving pubsub-notification """
14 logger.info('updating podcast for "%s" after pubsub notification', sender)
15 update_podcasts.delay([sender])