Provide debug log info when nodes are not indexed

This commit is contained in:
2018-03-21 02:15:46 +01:00
parent 2bf0bf1064
commit 67a24e9d4e

View File

@@ -73,9 +73,11 @@ def prepare_node_data(node_id: str, node: dict=None) -> dict:
return {} return {}
if node['node_type'] not in INDEX_ALLOWED_NODE_TYPES: if node['node_type'] not in INDEX_ALLOWED_NODE_TYPES:
log.debug('Node of type %s is not indexable by Pillar', node['node_type'])
return {} return {}
# If a nodes does not have status published, do not index # If a nodes does not have status published, do not index
if node['properties'].get('status') != 'published': if node['properties'].get('status') != 'published':
log.debug('Node %s is does not have published status', node_id)
return {} return {}
projects_collection = current_app.data.driver.db['projects'] projects_collection = current_app.data.driver.db['projects']