Skip to content

Commit a97f4ad

Browse files
committed
feat(dev): logging;
- Added debug logging.
1 parent f0a470a commit a97f4ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ckanext/xloader/plugin.py

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def notify(self, entity, operation):
119119
if toolkit.h.plugin_loaded('validation') and \
120120
toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')):
121121
if entity.__dict__.get('extras', {}).get('validation_status', None) != 'success':
122+
log.debug("Skipping xloading resource %s because "
123+
"resource did not pass validation yet.", entity.id)
122124
return
123125
elif not getattr(entity, 'url_changed', False):
124126
return
@@ -140,6 +142,8 @@ def after_resource_create(self, context, resource_dict):
140142
if toolkit.h.plugin_loaded('validation') and \
141143
toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')) and \
142144
resource_dict.get('validation_status', None) != 'success':
145+
log.debug("Skipping xloading resource %s because "
146+
"resource did not pass validation yet.", resource_dict.get('id'))
143147
return
144148
self._submit_to_xloader(resource_dict)
145149

0 commit comments

Comments
 (0)