def check_layer(self, layer): print 'Checking layer %s' % layer.name success, message = layer.check() if not success: from aggregator.models import TaskError task_error = TaskError( task_name=self.name, args=layer.id, message=message ) task_error.save()
def index_layer(self, layer): from aggregator.solr import SolrHypermap print 'Syncing layer %s to solr' % layer.name solrobject = SolrHypermap() success, message = solrobject.layer_to_solr(layer) if not success: from aggregator.models import TaskError task_error = TaskError( task_name=self.name, args=layer.id, message=message ) task_error.save()