dnaaun / openFraming

Tools for automatic frame discovery and labeling based on topic modeling and deep learning, made widely accessible to researchers from non computational backgrounds.
http://www.openframing.org
9 stars 7 forks source link

Avail app context during background tasks by breaking import cycle #257

Closed dnaaun closed 4 years ago

dnaaun commented 4 years ago

The app.app_context().push() was needed to use url_for() in a background task. This wasn't possible because importing flask_app.app from flask_app.modeling.scheduler would have caused a cyclic import. Restructured files a bit to avoid that.

Also added templates for emails to send in case of errors. Not actually sending them right now though.