From 3d58551a9e3a4e627ba39f3c961166accb5357d1 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Fri, 12 Apr 2024 06:52:33 +0000 Subject: [PATCH 1/2] cut old connections to db --- embark/uploader/boundedexecutor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index d4381d1e..f09486de 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -19,6 +19,7 @@ from django.dispatch import receiver from django.utils import timezone from django.conf import settings +from django.db import close_old_connections from uploader import finish_execution from uploader.archiver import Archiver @@ -96,6 +97,7 @@ def run_emba_cmd(cls, cmd, analysis_id=None, active_analyzer_dir=None): if return_code != 0: raise BoundedException("EMBA has non zero exit-code") + close_old_connections() # get csv log location csv_log_location = f"{settings.EMBA_LOG_ROOT}/{analysis_id}/emba_logs/csv_logs/f50_base_aggregator.csv" From 4281e62f0fc6fa31c5a932476e869e2ac39ea9cc Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Fri, 12 Apr 2024 10:14:58 +0000 Subject: [PATCH 2/2] work-around --- embark/uploader/boundedexecutor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index f09486de..36585bcc 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -43,7 +43,7 @@ semaphore = BoundedSemaphore(MAX_QUEUE) # emba directories -EMBA_SCRIPT_LOCATION = f"cd {settings.EMBA_ROOT} && sudo -E ./emba" +EMBA_SCRIPT_LOCATION = f"cd {settings.EMBA_ROOT} && sudo ./emba" class BoundedException(Exception):