コード例 #1
0
ファイル: models.py プロジェクト: supervisitor20/MyJobs
def update_job_in_solr(sender, instance, action, **kwargs):
    """
    Once a job is no longer associated with any locations, it should be removed
    from SOLR.
    """
    if action in ['post_remove', 'post_clear']:
        guids = JobLocation.objects.filter(jobs__isnull=True).values_list(
            'guid', flat=True)

        delete_by_guid(guids)
コード例 #2
0
ファイル: models.py プロジェクト: DirectEmployers/MyJobs
def update_job_in_solr(sender, instance, action, **kwargs):
    """
    Once a job is no longer associated with any locations, it should be removed
    from SOLR.
    """
    if action in ['post_remove', 'post_clear']:
        guids = JobLocation.objects.filter(
            jobs__isnull=True).values_list('guid', flat=True)

        delete_by_guid(guids)
コード例 #3
0
ファイル: models.py プロジェクト: supervisitor20/MyJobs
    def remove_from_solr(self):

        guids = [location.guid for location in self.locations.all()]
        delete_by_guid(guids)
コード例 #4
0
ファイル: models.py プロジェクト: DirectEmployers/MyJobs
    def remove_from_solr(self):

        guids = [location.guid for location in self.locations.all()]
        delete_by_guid(guids)