(self)
Sync the group, ie bring all members up-to-date
Sync the group, ie bring all members up-to-date
Sync the group ie bring all members up - to - date
def sync(self):
        """Sync the group, ie bring all members up-to-date"""
        from mygpo.subscriptions.tasks import subscribe

        # get all subscribed podcasts
        podcasts = set(self.get_subscribed_podcasts())

        # bring each client up to date, it it is subscribed to all podcasts
        for client in self.client_set.all():
            missing_podcasts = self.get_missing_podcasts(client, podcasts)
            for podcast in missing_podcasts:
                subscribe.delay(podcast.pk, self.user.pk, client.uid)
def sync ( self ) : from mygpo . subscriptions . tasks import subscribe # get all subscribed podcasts podcasts = set ( self . get_subscribed_podcasts ( ) ) # bring each client up to date, it it is subscribed to all podcasts for client in self . client_set . all ( ) : missing_podcasts = self . get_missing_podcasts ( client , podcasts ) for podcast in missing_podcasts : subscribe . delay ( podcast . pk , self . user . pk , client . uid )