Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
    def remove_from_solr(self):

        guids = [location.guid for location in self.locations.all()]
        delete_by_guid(guids)
Ejemplo n.º 4
0
    def remove_from_solr(self):

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