mirror of
https://github.com/veops/cmdb.git
synced 2025-10-25 21:39:21 +08:00
fix outside of application context
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# encoding=utf-8
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from flask.ext.mail import Mail
|
||||
@@ -6,11 +6,14 @@ from flask.ext.sqlalchemy import SQLAlchemy
|
||||
from flask.ext.cache import Cache
|
||||
from flask.ext.celery import Celery
|
||||
|
||||
from lib.utils import RedisHandler
|
||||
|
||||
__all__ = ['mail', 'db', 'cache', 'celery']
|
||||
|
||||
__all__ = ['mail', 'db', 'cache', 'celery', "rd"]
|
||||
|
||||
|
||||
mail = Mail()
|
||||
db = SQLAlchemy()
|
||||
cache = Cache()
|
||||
celery = Celery()
|
||||
celery = Celery()
|
||||
rd = RedisHandler()
|
||||
Reference in New Issue
Block a user