def get_and_store_friends(self, user): """Gets and stores your Facebook friends to DB Both the get and the store run in a async task when ``FACEBOOK_CELERY_STORE = True`` """ if facebook_settings.FACEBOOK_CELERY_STORE: from django_facebook.tasks import get_and_store_friends get_and_store_friends.delay(user, self) else: self._get_and_store_friends(user)
def get_and_store_friends(self, user): ''' Gets and stores your facebook friends to DB Both the get and the store run in a async task when FACEBOOK_CELERY_STORE = True ''' if facebook_settings.FACEBOOK_CELERY_STORE: from django_facebook.tasks import get_and_store_friends get_and_store_friends.delay(user, self) else: self._get_and_store_friends(user)
def get_and_store_friends(self, auth_user): ''' Gets and stores your facebook friends to DB Both the get and the store run in a async task when FACEBOOK_CELERY_STORE = True ''' from django_facebook.utils import get_profile_class profile_class = get_profile_class() base_object = profile_class.objects.get(user=auth_user.id) if not len(base_object.friends): if facebook_settings.FACEBOOK_CELERY_STORE: from django_facebook.tasks import get_and_store_friends get_and_store_friends.delay(auth_user, self) else: self._get_and_store_friends(auth_user)