villebro commented on a change in pull request #10427:
URL:
https://github.com/apache/incubator-superset/pull/10427#discussion_r462761463
##########
File path: superset/tasks/schedules.py
##########
@@ -542,16 +541,15 @@ def schedule_alert_query( # pylint:
disable=unused-argument
recipients: Optional[str] = None,
) -> None:
model_cls = get_scheduler_model(report_type)
- dbsession = db.create_scoped_session()
- schedule = dbsession.query(model_cls).get(schedule_id)
+ schedule = db.session.query(model_cls).get(schedule_id)
Review comment:
This has me wondering, is there risk that this gets torn down
prematurely by the initiating session's closure? My intuition says it
shouldn't, but it seems strange that this would have been put here by accident.
----------------------------------------------------------------
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]