Skip to content

Commit 513cb29

Browse files
committed
Add runner field to ScriptActivity
1 parent 7a0e59e commit 513cb29

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

yamcs-client/src/yamcs/client/activities.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ class ScriptActivity(Activity):
8686
script as the environment variable ``YAMCS_PROCESSOR``.
8787
"""
8888

89+
runner: Optional[str] = None
90+
"""
91+
Optional runner name. In case of multiple runners, use this
92+
field to control which one is to run this particular script.
93+
"""
94+
8995
@staticmethod
9096
def _from_proto(proto: activities_pb2.ActivityDefinitionInfo):
9197
activity = ScriptActivity(script=proto.args["script"])
@@ -96,6 +102,9 @@ def _from_proto(proto: activities_pb2.ActivityDefinitionInfo):
96102
if "processor" in proto.args:
97103
activity.processor = proto.args["processor"]
98104

105+
if "runner" in proto.args:
106+
activity.runner = proto.args["runner"]
107+
99108
return activity
100109

101110
def _to_proto(self) -> activities_pb2.ActivityDefinitionInfo:
@@ -109,6 +118,9 @@ def _to_proto(self) -> activities_pb2.ActivityDefinitionInfo:
109118
if self.processor:
110119
proto.args["processor"] = self.processor
111120

121+
if self.runner:
122+
proto.args["runner"] = self.runner
123+
112124
return proto
113125

114126

0 commit comments

Comments
 (0)