let python calculate default threadpool workers based on cpu count

This commit is contained in:
wh1te909 2021-01-03 09:12:38 +00:00
parent 96942719f2
commit 3b47b9558a
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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