You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/01/13 04:29:05 UTC

[GitHub] mistercrunch closed pull request #6512: Fix scheduled reports for mysql

mistercrunch closed pull request #6512: Fix scheduled reports for mysql
URL: https://github.com/apache/incubator-superset/pull/6512
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/tasks/schedules.py b/superset/tasks/schedules.py
index a8f1eb13b6..7b5702314d 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:


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org