Skip to content

Commit 6519f6c

Browse files
style(gservice): extract machine_pool_agent's uuid to a named variable
Match the surrounding file's own convention (e.g. the set_agent block right below) instead of inlining the uuid5 call as a constructor arg.
1 parent 34f90c2 commit 6519f6c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

exordos_core/gservice/service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,16 @@ def __init__(self, iter_min_period=3, iter_pause=0.1):
106106
pool_driver = ua_pool_drivers.PoolAgentDriver(
107107
meta_file="/var/lib/exordos/exordos_core/pool_agent_meta.json"
108108
)
109+
agent_uuid = sys_uuid.uuid5(ua_utils.system_uuid(), "machine_pool_agent")
109110
machine_pool_agent = ua_agent_service.UniversalAgentService(
110-
agent_uuid=sys_uuid.uuid5(ua_utils.system_uuid(), "machine_pool_agent"),
111+
agent_uuid=agent_uuid,
111112
orch_client=orch_db.DatabaseOrchClient(),
112113
caps_drivers=[pool_driver],
113114
facts_drivers=[],
114115
iter_min_period=iter_min_period,
115116
payload_path=None,
116117
)
118+
117119
set_builder = set_builder_svc.NodeSetBuilderService(
118120
instance_model=node_set_models.NodeSet,
119121
project_id=nc.NODE_SET_PROJECT,

0 commit comments

Comments
 (0)