remove threading
This commit is contained in:
parent
5d8fce21ac
commit
8134d5e24d
|
@ -41,4 +41,23 @@
|
|||
"**/*.zip": true
|
||||
},
|
||||
},
|
||||
"go.useLanguageServer": true,
|
||||
"[go]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": false,
|
||||
},
|
||||
"editor.snippetSuggestions": "none",
|
||||
},
|
||||
"[go.mod]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": true,
|
||||
},
|
||||
},
|
||||
"gopls": {
|
||||
"usePlaceholders": true,
|
||||
"completeUnimported": true,
|
||||
"staticcheck": true,
|
||||
}
|
||||
}
|
|
@ -3,7 +3,6 @@ from loguru import logger
|
|||
from time import sleep
|
||||
import random
|
||||
import requests
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from packaging import version as pyver
|
||||
from typing import List
|
||||
|
||||
|
@ -40,16 +39,16 @@ 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() as executor:
|
||||
executor.map(_check_in_full, agents)
|
||||
for agent in agents:
|
||||
_check_in_full(agent)
|
||||
|
||||
|
||||
@app.task
|
||||
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() as executor:
|
||||
executor.map(_check_agent_service, agents)
|
||||
for agent in agents:
|
||||
_check_agent_service(agent)
|
||||
|
||||
|
||||
def agent_update(pk: int) -> str:
|
||||
|
|
|
@ -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.21"
|
||||
TRMM_VERSION = "0.2.22"
|
||||
|
||||
# bump this version everytime vue code is changed
|
||||
# to alert user they need to manually refresh their browser
|
||||
|
|
Loading…
Reference in New Issue