def store_likes(self, user, likes): ''' Given a user and likes store these in the db Note this can be a heavy operation, best to do it in the background using celery ''' if facebook_settings.FACEBOOK_CELERY_STORE: from django_facebook.tasks import store_likes store_likes.delay(user, likes) else: self._store_likes(user, likes)