dpgaspar commented on a change in pull request #13740:
URL: https://github.com/apache/superset/pull/13740#discussion_r604286390
##########
File path: superset/tasks/scheduler.py
##########
@@ -67,6 +68,8 @@ def execute(report_schedule_id: int, scheduled_dttm: str) ->
None:
AsyncExecuteReportScheduleCommand(report_schedule_id,
scheduled_dttm_).run()
except ReportScheduleUnexpectedError as ex:
logger.error("An unexpected occurred while executing the report: %s",
ex)
+ except SoftTimeLimitExceeded as ex:
Review comment:
nit: this is probably unnecessary because we already catch and reraise
it here:
https://github.com/apache/superset/blob/master/superset/reports/commands/execute.py#L183
##########
File path: superset/sql_lab.py
##########
@@ -159,6 +159,13 @@ def get_sql_results( # pylint: disable=too-many-arguments
expand_data=expand_data,
log_params=log_params,
)
+ except SoftTimeLimitExceeded as ex:
+ logger.error("Query %d: Time limit exceeded", query_id)
+ logger.debug("Query %d: %s", query_id, ex)
+ raise SqlLabTimeoutException(
+ "SQL Lab timeout. This environment's policy is to kill queries
"
Review comment:
If this error goes to the user we should translate it using flask babel
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]