Skip to content

Commit 383f45c

Browse files
committed
feat(dev): logging;
- Added debug logging.
1 parent 1af024b commit 383f45c

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
@@ -89,6 +89,8 @@ def notify(self, entity, operation):
8989
if toolkit.h.plugin_loaded('validation') and \
9090
toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')):
9191
if entity.__dict__.get('extras', {}).get('validation_status', None) != 'success':
92+
log.debug("Skipping xloading resource %s because "
93+
"resource did not pass validation yet.", entity.id)
9294
return
9395
elif not getattr(entity, 'url_changed', False):
9496
return
@@ -110,6 +112,8 @@ def after_resource_create(self, context, resource_dict):
110112
if toolkit.h.plugin_loaded('validation') and \
111113
toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')) and \
112114
resource_dict.get('validation_status', None) != 'success':
115+
log.debug("Skipping xloading resource %s because "
116+
"resource did not pass validation yet.", resource_dict.get('id'))
113117
return
114118
self._submit_to_xloader(resource_dict)
115119

0 commit comments

Comments
 (0)