Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elactic 8.x #552

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ COPY . /src
WORKDIR /src

# Install app dependencies and create supervisord dirs
RUN pip3 install -U -r requirements.txt && \
RUN pip3 install --upgrade pip==21.3.1 && \
pip3 install -U -r requirements.txt && \
pip3 install gunicorn==19.7.1 && \
mkdir -p /etc/supervisor/conf.d /var/log/supervisor /var/run/supervisor

Expand Down
8 changes: 1 addition & 7 deletions elastichq/service/HQService.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ def get_settings(self, cluster_name):
settings_doc = connection.get_source(index=current_app.config.get('HQ_CLUSTER_SETTINGS')[
'index_name'],
id=current_app.config.get('HQ_CLUSTER_SETTINGS')[
'doc_id'],
doc_type=current_app.config.get('HQ_CLUSTER_SETTINGS')[
'doc_type'])

'doc_id'])
return settings_doc
except NotFoundError as nfe:
if current_app.config.get('HQ_CLUSTER_SETTINGS')['store_metrics']:
Expand All @@ -65,7 +62,6 @@ def save_settings(self, cluster_name, body=None):
body = current_app.config.get('HQ_CLUSTER_SETTINGS')
connection = ConnectionService().get_connection(cluster_name)
connection.index(index=current_app.config.get('HQ_CLUSTER_SETTINGS')['index_name'],
doc_type=current_app.config.get('HQ_CLUSTER_SETTINGS')['doc_type'],
id=current_app.config.get('HQ_CLUSTER_SETTINGS')['doc_id'],
body=body, refresh=True)
except NotFoundError as nfe:
Expand All @@ -80,7 +76,6 @@ def update_settings(self, cluster_name, body=None):
'doc_id': current_app.config.get('HQ_CLUSTER_SETTINGS')['doc_id'],
'index_name': current_app.config.get('HQ_CLUSTER_SETTINGS')['index_name'],
'version': 1,
'doc_type': current_app.config.get('HQ_CLUSTER_SETTINGS')['doc_type'],
'store_metrics': body.get('store_metrics', current_settings.get('store_metrics')),
'websocket_interval': body.get('websocket_interval',
current_settings.get('websocket_interval')),
Expand All @@ -94,7 +89,6 @@ def update_settings(self, cluster_name, body=None):

connection = ConnectionService().get_connection(cluster_name)
connection.update(index=current_app.config.get('HQ_CLUSTER_SETTINGS')['index_name'],
doc_type=current_app.config.get('HQ_CLUSTER_SETTINGS')['doc_type'],
id=current_app.config.get('HQ_CLUSTER_SETTINGS')['doc_id'],
body={"doc": new_settings}, refresh=True)

Expand Down