mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-17 16:11:20 -05:00
Merge pull request #3401 from alphagov/hide-log-line
don't log if we dont delete anything for a service
This commit is contained in:
@@ -136,14 +136,15 @@ def delete_notifications_for_service_and_type(service_id, notification_type, dat
|
||||
service_id,
|
||||
datetime_to_delete_before,
|
||||
)
|
||||
end = datetime.utcnow()
|
||||
current_app.logger.info(
|
||||
f'delete-notifications-for-service-and-type: '
|
||||
f'service: {service_id}, '
|
||||
f'notification_type: {notification_type}, '
|
||||
f'count deleted: {num_deleted}, '
|
||||
f'duration: {(end - start).seconds} seconds'
|
||||
)
|
||||
if num_deleted:
|
||||
end = datetime.utcnow()
|
||||
current_app.logger.info(
|
||||
f'delete-notifications-for-service-and-type: '
|
||||
f'service: {service_id}, '
|
||||
f'notification_type: {notification_type}, '
|
||||
f'count deleted: {num_deleted}, '
|
||||
f'duration: {(end - start).seconds} seconds'
|
||||
)
|
||||
|
||||
|
||||
@notify_celery.task(name='timeout-sending-notifications')
|
||||
|
||||
Reference in New Issue
Block a user