Skip to content

Commit 803f01a

Browse files
Emantorjluebbe
authored andcommitted
remote/exporter: poll resource on add
Instead of providing incomplete resources on startup since the resource information has not been polled yet, poll the resource once while adding it. Signed-off-by: Rouven Czerwinski <[email protected]>
1 parent fc33503 commit 803f01a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

labgrid/remote/exporter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,10 @@ async def add_resource(self, group_name, resource_name, cls, params):
10001000
}
10011001
proxy_req = self.isolated
10021002
if issubclass(export_cls, ResourceExport):
1003-
group[resource_name] = export_cls(config, host=self.hostname, proxy=getfqdn(), proxy_required=proxy_req)
1003+
res = group[resource_name] = export_cls(
1004+
config, host=self.hostname, proxy=getfqdn(), proxy_required=proxy_req
1005+
)
1006+
res.poll()
10041007
else:
10051008
config["params"]["extra"] = {
10061009
"proxy": getfqdn(),

0 commit comments

Comments
 (0)