From 00e55b3a15873cd03c7c06532fc9bae23f45e409 Mon Sep 17 00:00:00 2001 From: "nikita.smirnov" Date: Thu, 28 Nov 2024 12:58:39 +0400 Subject: [PATCH] Added Custom python translator --- json_stream_provider/custom_engines.py | 2 +- local-run/with-jupyter-notebook/nginx.conf | 4 +++- server.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/json_stream_provider/custom_engines.py b/json_stream_provider/custom_engines.py index 2a9d739..33f8321 100644 --- a/json_stream_provider/custom_engines.py +++ b/json_stream_provider/custom_engines.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging.config +import logging import time from datetime import datetime diff --git a/local-run/with-jupyter-notebook/nginx.conf b/local-run/with-jupyter-notebook/nginx.conf index e17f94a..12c01ff 100644 --- a/local-run/with-jupyter-notebook/nginx.conf +++ b/local-run/with-jupyter-notebook/nginx.conf @@ -2,8 +2,9 @@ events { } http { - + client_max_body_size 200M; server { + client_max_body_size 200M; listen 80; server_name localhost; @@ -17,6 +18,7 @@ http { } location /jupyter/ { + client_max_body_size 200M; proxy_pass http://jupyter_notebook:8888; # WebSocket support diff --git a/server.py b/server.py index a0bb51e..68736f3 100644 --- a/server.py +++ b/server.py @@ -36,6 +36,7 @@ from json_stream_provider import papermill_execute_ext as epm from json_stream_provider.custom_engines import CustomEngine, EngineBusyError +from json_stream_provider.custom_python_translator import CustomPythonTranslator from json_stream_provider.log_configuratior import configure_logging from json_stream_provider.papermill_execute_ext import DEFAULT_ENGINE_USER_ID @@ -52,6 +53,7 @@ configure_logging() CustomEngine.create_logger() +CustomPythonTranslator.create_logger() logger: logging.Logger = logging.getLogger('j-sp')