Added redis stuffs
This commit is contained in:
@@ -6,10 +6,11 @@ from sentry_sdk.integrations.flask import FlaskIntegration
|
||||
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
||||
from healthcheck import HealthCheck
|
||||
|
||||
from redis_client import redis_client
|
||||
from config import Config
|
||||
from marshm import ma
|
||||
from influxus import influx_db
|
||||
from resources import SampleResource, SampleParameterResource
|
||||
from resources import SampleResource
|
||||
from healthchecks import amqp_connection_status
|
||||
|
||||
import atexit
|
||||
@@ -49,6 +50,8 @@ api = Api(app)
|
||||
health = HealthCheck()
|
||||
ma.init_app(app)
|
||||
|
||||
redis_client.init_app(app)
|
||||
|
||||
# ampq magic stuff
|
||||
magic_amqp.init_app(app)
|
||||
|
||||
@@ -67,6 +70,7 @@ def init_db():
|
||||
if Config.ENABLE_INFLUXDB:
|
||||
influx_db.database.create(Config.INFLUXDB_DATABASE)
|
||||
|
||||
|
||||
# Setup tracing
|
||||
def initialize_tracer():
|
||||
app.logger.info("Initializing jaeger...")
|
||||
@@ -88,6 +92,7 @@ app.add_url_rule("/healthz", "healthcheck", view_func=lambda: health.run())
|
||||
|
||||
if __name__ != '__main__':
|
||||
import logging
|
||||
|
||||
gunicorn_logger = logging.getLogger('gunicorn.error')
|
||||
app.logger.handlers = gunicorn_logger.handlers
|
||||
app.logger.setLevel(gunicorn_logger.level)
|
||||
|
||||
Reference in New Issue
Block a user