From 925af5b103b99a670f6c1f3c91db63df9e98a767 Mon Sep 17 00:00:00 2001 From: Ran Lu Date: Fri, 22 Mar 2024 15:59:18 -0400 Subject: [PATCH] Fix missing variable --- dags/dag_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/dag_utils.py b/dags/dag_utils.py index 432a043c..2589d8be 100644 --- a/dags/dag_utils.py +++ b/dags/dag_utils.py @@ -5,7 +5,7 @@ def check_manager_node(ntasks): available_mem = psutil.virtual_memory().available expected_mem = 2*ntasks*1024*1024*10 # 10MB for each postgresql connection if available_mem < expected_mem: - slack_message(f":u7981:*ERROR: You need {humanize.naturalsize(expected_mem)} RAM to handle {ntasks} tasks, the manager node only have {humanize.naturalsize(total_mem)} RAM*") + slack_message(f":u7981:*ERROR: You need {humanize.naturalsize(expected_mem)} RAM to handle {ntasks} tasks, the manager node only have {humanize.naturalsize(available_mem)} RAM*") return False return True