提交 42cf929f 编写于 作者: M Mahendra M 提交者: Maxime Beauchemin

Fix scheduled reports for mysql (#6512)

* Fix scheduled reports for mysql

* Really revert setup.py

* Fix after rebase
上级 8e6c1141
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册