remove celery
This commit is contained in:
9
app.py
9
app.py
@@ -14,7 +14,6 @@ import click
|
||||
from utils import timeago
|
||||
from extensions import db, login_manager, csrf
|
||||
from utils.email_templates import create_default_templates
|
||||
from celery_worker import init_celery, celery
|
||||
|
||||
# Load environment variables
|
||||
load_dotenv()
|
||||
@@ -36,9 +35,6 @@ def create_app():
|
||||
login_manager.login_view = 'auth.login'
|
||||
csrf.init_app(app)
|
||||
|
||||
# Initialize Celery
|
||||
init_celery(app)
|
||||
|
||||
@app.context_processor
|
||||
def inject_csrf_token():
|
||||
return dict(csrf_token=generate_csrf())
|
||||
@@ -63,12 +59,9 @@ def create_app():
|
||||
try:
|
||||
# Check database connection
|
||||
db.session.execute('SELECT 1')
|
||||
# Check Redis connection
|
||||
celery.control.inspect().ping()
|
||||
return jsonify({
|
||||
'status': 'healthy',
|
||||
'database': 'connected',
|
||||
'redis': 'connected'
|
||||
'database': 'connected'
|
||||
}), 200
|
||||
except Exception as e:
|
||||
return jsonify({
|
||||
|
||||
Reference in New Issue
Block a user