remove debug prints

This commit is contained in:
Matthias 2021-12-04 03:51:40 +01:00
parent 453589dbcb
commit 6c6683657e
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -176,19 +176,13 @@ def trigger_notifaction(obj, category=None, obj_ref='pk', targets=None, target_f
# Collect possible methods # Collect possible methods
delivery_methods = inheritors(NotificationMethod) delivery_methods = inheritors(NotificationMethod)
# TODO remove -> this is for debugging the delivery method runfs
if settings.TESTING:
print(delivery_methods)
for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]: for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]:
logger.info(f"Triggering method '{method.METHOD_NAME}'") logger.info(f"Triggering method '{method.METHOD_NAME}'")
try: try:
deliver_notification(method, obj, category, targets, context) deliver_notification(method, obj, category, targets, context)
except NotImplementedError as error: except NotImplementedError as error:
print('NotImplementedError')
raise error raise error
except Exception as error: except Exception as error:
print(error)
logger.error(error) logger.error(error)
# Set delivery flag # Set delivery flag