add more logging in apps.alerts.tasks.notify_user.perform_notification task (#3403)
# What this PR does add more logging in `apps.alerts.tasks.notify_user.perform_notification` task (related to https://github.com/grafana/oncall-private/issues/2318; won't solve that issue but will help with the investigation)
This commit is contained in:
parent
56d1b529e9
commit
f70c439334
1 changed files with 10 additions and 0 deletions
|
|
@ -230,8 +230,18 @@ def perform_notification(log_record_pk):
|
|||
from apps.base.models import UserNotificationPolicy, UserNotificationPolicyLogRecord
|
||||
from apps.telegram.models import TelegramToUserConnector
|
||||
|
||||
# TODO: remove this log line once done investigation
|
||||
task_logger.info(f"perform_notification: log_record {log_record_pk}")
|
||||
|
||||
log_record = UserNotificationPolicyLogRecord.objects.get(pk=log_record_pk)
|
||||
|
||||
# TODO: uncomment this out once done investigation
|
||||
# try:
|
||||
# log_record = UserNotificationPolicyLogRecord.objects.get(pk=log_record_pk)
|
||||
# except UserNotificationPolicyLogRecord.DoesNotExist:
|
||||
# task_logger.info(f"perform_notification: log_record {log_record_pk} doesn't exist. Skipping remainder of task")
|
||||
# return
|
||||
|
||||
user = log_record.author
|
||||
alert_group = log_record.alert_group
|
||||
notification_policy = log_record.notification_policy
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue