Skip to content

Commit b58e091

Browse files
authored
[RSDK-12691] Allow modules to start with no parent (#1047)
1 parent 09b0b82 commit b58e091

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/viam/module/module.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
from .service import ModuleRPCService
6464
from .types import Reconfigurable, Stoppable
6565

66+
NO_MODULE_PARENT = os.environ.get("VIAM_NO_MODULE_PARENT", "").lower() == "true"
67+
6668

6769
def _parse_module_args() -> argparse.Namespace:
6870
"""
@@ -156,6 +158,8 @@ def __init__(self, address: str, *, log_level: int = logging.INFO, tcp_mode: boo
156158
self._lock = Lock()
157159

158160
async def _connect_to_parent(self):
161+
if NO_MODULE_PARENT:
162+
return
159163
if self.parent is None:
160164
if self._parent_address is None:
161165
raise ValueError("Parent address not found")

0 commit comments

Comments
 (0)