From 8bdf324e0fa3340af2d37185ed40ec4b76045437 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 7 May 2024 10:28:55 -0700 Subject: [PATCH] Use `tmp` path for user config for k8s compat --- neon_hana/mq_websocket_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neon_hana/mq_websocket_api.py b/neon_hana/mq_websocket_api.py index 9ae325d..3ea6372 100644 --- a/neon_hana/mq_websocket_api.py +++ b/neon_hana/mq_websocket_api.py @@ -25,6 +25,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from asyncio import run, get_event_loop +from os import makedirs from time import time from fastapi import WebSocket from neon_iris.client import NeonAIClient @@ -39,7 +40,9 @@ def __init__(self, config: dict): Creates an MQWebsocketAPI to serve multiple client WS connections. """ mq_config = config.get("MQ") or dict() - NeonAIClient.__init__(self, mq_config) + config_dir = "/tmp/hana" + makedirs(config_dir, exist_ok=True) + NeonAIClient.__init__(self, mq_config, config_dir=config_dir) self._sessions = dict() self._session_lock = RLock() self._client = "neon_node_websocket"