mirror of https://github.com/apache/superset.git
chore: add more logging for alerts and reports (#21714)
This commit is contained in:
parent
2258fbf878
commit
f4fa2e1115
|
@ -437,7 +437,11 @@ class BaseReportState:
|
|||
"""
|
||||
header_data = self._get_log_data()
|
||||
header_data["error_text"] = message
|
||||
logger.info("header_data info %s", header_data)
|
||||
logger.info(
|
||||
"header_data in notifications for alerts and reports %s, taskid, %s",
|
||||
header_data,
|
||||
self._execution_id,
|
||||
)
|
||||
notification_content = NotificationContent(
|
||||
name=name, text=message, header_data=header_data
|
||||
)
|
||||
|
@ -690,6 +694,11 @@ class AsyncExecuteReportScheduleCommand(BaseCommand):
|
|||
self, session: Session = None
|
||||
) -> None:
|
||||
# Validate/populate model exists
|
||||
logger.info(
|
||||
"session is validated: id %s, executionid: %s",
|
||||
self._model_id,
|
||||
self._execution_id,
|
||||
)
|
||||
self._model = ReportScheduleDAO.find_by_id(self._model_id, session=session)
|
||||
if not self._model:
|
||||
raise ReportScheduleNotFoundError()
|
||||
|
|
|
@ -76,6 +76,11 @@ def execute(report_schedule_id: int, scheduled_dttm: str) -> None:
|
|||
try:
|
||||
task_id = execute.request.id
|
||||
scheduled_dttm_ = parser.parse(scheduled_dttm)
|
||||
logger.info(
|
||||
"Executing alert/report, task id: %s, scheduled_dttm: %s",
|
||||
task_id,
|
||||
scheduled_dttm,
|
||||
)
|
||||
AsyncExecuteReportScheduleCommand(
|
||||
task_id,
|
||||
report_schedule_id,
|
||||
|
|
Loading…
Reference in New Issue