feat(fleet): integrate independent trackers, VPS pairing and recoverable commands
This commit is contained in:
@@ -9,6 +9,11 @@ import time
|
||||
from contextlib import suppress
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .independent_equipment import EquipmentStore
|
||||
from .vps_hosts import VPSHosts
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
|
||||
@@ -27,6 +32,8 @@ class FleetRegistry:
|
||||
raise PairingError("Хранилище реестра требует закрытый каталог.")
|
||||
self.started_at = time.time()
|
||||
self.root = root
|
||||
self.independent_equipment: EquipmentStore | None = None
|
||||
self.vps_hosts: VPSHosts | None = None
|
||||
self.lock = threading.RLock()
|
||||
from .events import FleetEvents
|
||||
|
||||
@@ -119,6 +126,8 @@ class FleetRegistry:
|
||||
|
||||
def close(self):
|
||||
self.stop.set()
|
||||
if self.vps_hosts is not None:
|
||||
self.vps_hosts.close()
|
||||
if self.worker:
|
||||
self.worker.join(timeout=20)
|
||||
if self.recovery_worker:
|
||||
|
||||
Reference in New Issue
Block a user