This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 42cf929 Fix scheduled reports for mysql (#6512)
42cf929 is described below
commit 42cf929f6281e4a1f0ca702f80093c4326971f67
Author: Mahendra M <[email protected]>
AuthorDate: Sat Jan 12 20:29:03 2019 -0800
Fix scheduled reports for mysql (#6512)
* Fix scheduled reports for mysql
* Really revert setup.py
* Fix after rebase
---
superset/tasks/schedules.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/tasks/schedules.py b/superset/tasks/schedules.py
index a8f1eb1..7b57023 100644
--- a/superset/tasks/schedules.py
+++ b/superset/tasks/schedules.py
@@ -360,7 +360,7 @@ def deliver_slice(schedule):
@celery_app.task(name='email_reports.send', bind=True, soft_time_limit=300)
def schedule_email_report(task, report_type, schedule_id, recipients=None):
model_cls = get_scheduler_model(report_type)
- schedule = db.session.query(model_cls).get(schedule_id)
+ schedule = db.create_scoped_session().query(model_cls).get(schedule_id)
# The user may have disabled the schedule. If so, ignore this
if not schedule or not schedule.active: