[plugins] Fix scheduler accessing database while unbound from session
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
This commit is contained in:
parent
88a4dc24f2
commit
9e8117e554
|
@ -60,6 +60,9 @@ class SchedulerPlugin(Plugin):
|
|||
self.blueprint.add_url_rule("/cron", view_func=__view_func)
|
||||
|
||||
def run_tasks(self):
|
||||
from ..database import db
|
||||
self = db.session.merge(self)
|
||||
|
||||
changed = False
|
||||
now = datetime.now()
|
||||
status = self.get_setting("status", default=dict())
|
||||
|
|
Loading…
Reference in New Issue