This commit is contained in:
parent
211be6cf96
commit
8e0b252c92
11
src/app.py
11
src/app.py
@ -42,11 +42,11 @@ app.config['FLASK_PIKA_PARAMS'] = {'host': RABBITMQ_HOST,
|
|||||||
'password': RABBITMQ_PASSWORD,
|
'password': RABBITMQ_PASSWORD,
|
||||||
'port': 5672,
|
'port': 5672,
|
||||||
'virtual_host': '/'}
|
'virtual_host': '/'}
|
||||||
app.config['INFLUXDB_HOST']=INFLUXDB_HOST
|
app.config['INFLUXDB_HOST'] = INFLUXDB_HOST
|
||||||
app.config['INFLUXDB_PORT']=INFLUXDB_PORT
|
app.config['INFLUXDB_PORT'] = INFLUXDB_PORT
|
||||||
app.config['INFLUXDB_USER']=INFLUXDB_USERNAME
|
app.config['INFLUXDB_USER'] = INFLUXDB_USERNAME
|
||||||
app.config['INFLUXDB_PASSWORD']=INFLUXDB_PASSWORD
|
app.config['INFLUXDB_PASSWORD'] = INFLUXDB_PASSWORD
|
||||||
app.config['INFLUXDB_DATABASE']=INFLUXDB_DB
|
app.config['INFLUXDB_DATABASE'] = INFLUXDB_DB
|
||||||
|
|
||||||
api = Api(app)
|
api = Api(app)
|
||||||
health = HealthCheck()
|
health = HealthCheck()
|
||||||
@ -55,6 +55,7 @@ ma.init_app(app)
|
|||||||
influx_db.init_app(app)
|
influx_db.init_app(app)
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
influx_db.database.create(INFLUXDB_DB)
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
|
||||||
api.add_resource(SampleResource, "/sample")
|
api.add_resource(SampleResource, "/sample")
|
||||||
|
Loading…
Reference in New Issue
Block a user