fix scheduler, add logging for grt free slots
This commit is contained in:
+5
-2
@@ -1,9 +1,12 @@
|
||||
from flask import current_app
|
||||
from extensions import flask_app
|
||||
|
||||
|
||||
def with_app_context(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
with current_app.app_context():
|
||||
if flask_app is None:
|
||||
raise RuntimeError("Flask app is not initialized")
|
||||
|
||||
with flask_app.app_context():
|
||||
return func(*args, **kwargs)
|
||||
|
||||
return wrapper
|
||||
|
||||
Reference in New Issue
Block a user