Skip to content
Snippets Groups Projects

Draft: Cover search service

Closed Martin Weise requested to merge cover-search-service into dev
Files
15
@@ -4,7 +4,6 @@ import os
@@ -4,7 +4,6 @@ import os
import logging
import logging
from flasgger import LazyJSONEncoder, Swagger
from flasgger import LazyJSONEncoder, Swagger
from flask import Flask
from flask import Flask
from opensearchpy import OpenSearch
from config import Config
from config import Config
from prometheus_flask_exporter import PrometheusMetrics
from prometheus_flask_exporter import PrometheusMetrics
@@ -102,16 +101,6 @@ def create_app(config_class=Config):
@@ -102,16 +101,6 @@ def create_app(config_class=Config):
# load configuration
# load configuration
app.config.from_object(config_class)
app.config.from_object(config_class)
logging.info('opensearch endpoint 1: %s:%d', app.config["SEARCH_HOST"], app.config["SEARCH_PORT"])
app.opensearch_client = (
OpenSearch(hosts=[{"host": app.config["SEARCH_HOST"], "port": app.config["SEARCH_PORT"]}],
http_compress=True,
http_auth=(app.config["SEARCH_USERNAME"], app.config["SEARCH_PASSWORD"]),
)
if app.config["SEARCH_HOST"]
else None
)
# register blueprints
# register blueprints
from app.api import api_bp
from app.api import api_bp
Loading