From 3b47b9558aea4587b1d9387050b9eaf3623a8005 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 3 Jan 2021 09:12:38 +0000 Subject: [PATCH] let python calculate default threadpool workers based on cpu count --- api/tacticalrmm/agents/tasks.py | 4 ++-- api/tacticalrmm/tacticalrmm/settings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/tacticalrmm/agents/tasks.py b/api/tacticalrmm/agents/tasks.py index 11713f1a..44e4b5f0 100644 --- a/api/tacticalrmm/agents/tasks.py +++ b/api/tacticalrmm/agents/tasks.py @@ -39,7 +39,7 @@ def check_in_task() -> None: agents: List[int] = [ i.pk for i in q if pyver.parse(i.version) >= pyver.parse("1.1.12") ] - with ThreadPoolExecutor(max_workers=30) as executor: + with ThreadPoolExecutor() as executor: executor.map(_check_in_full, agents) @@ -47,7 +47,7 @@ def check_in_task() -> None: def monitor_agents_task() -> None: q = Agent.objects.all() agents: List[int] = [i.pk for i in q if i.has_nats and i.status != "online"] - with ThreadPoolExecutor(max_workers=15) as executor: + with ThreadPoolExecutor() as executor: executor.map(_check_agent_service, agents) diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 7ccf3e2f..b5d29689 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -15,7 +15,7 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe") AUTH_USER_MODEL = "accounts.User" # latest release -TRMM_VERSION = "0.2.19" +TRMM_VERSION = "0.2.20" # bump this version everytime vue code is changed # to alert user they need to manually refresh their browser