You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize DynamicConfigManager with agents and app_name.
36
40
37
41
Args:
38
42
agents (list[Agent] | Agent): The agent(s) to be included in the dynamic config.
39
-
app_name (str): The name of the application, used as the Nacos group id. Defaults to DEFAULT_NACOS_GROUP.
40
43
"""
41
44
ifisinstance(agents, list):
42
45
self.agents=agents
43
46
else:
44
47
self.agents= [agents]
45
48
46
-
ifnotapp_name:
49
+
logger.debug(f"DynamicConfigManager init with {len(self.agents)} agent(s).")
50
+
51
+
asyncdefcreate_config(
52
+
self,
53
+
configs: dict= {},
54
+
instance_name: str="",
55
+
group_id: str="",
56
+
):
57
+
ifnotinstance_name:
47
58
logger.warning(
48
-
f"app_name is not provided, use default value {DEFAULT_NACOS_GROUP}. This may lead to unexpected behavior such as configuration override."
59
+
f"instance_name is not provided, use default value `{DEFAULT_NACOS_INSTANCE_NAME}`. This may lead to unexpected behavior such as configuration override."
49
60
)
50
-
self.app_name=app_nameorDEFAULT_NACOS_GROUP
61
+
instance_name=DEFAULT_NACOS_INSTANCE_NAME
51
62
52
-
logger.debug(
53
-
f"DynamicConfigManager init with {len(self.agents)} agent(s) for app {self.app_name}"
54
-
)
63
+
ifnotgroup_id:
64
+
logger.warning(
65
+
f"group_id is not provided, use default value `{DEFAULT_NACOS_GROUP}`. This may lead to unexpected behavior such as configuration override."
0 commit comments