@@ -128,6 +128,30 @@ class RunTypeConfiguration(BaseModel):
128
128
"""ID of the reference for the run type."""
129
129
130
130
131
+ class RunQueueing (BaseModel ):
132
+ """Queueing configuration for a run."""
133
+
134
+ priority : Optional [int ] = None
135
+ """
136
+ Priority of the run in the queue. 1 is the highest priority, 10 is the
137
+ lowest priority.
138
+ """
139
+ disabled : Optional [bool ] = None
140
+ """
141
+ Whether the run should be queued, or not. If True, the run will not be
142
+ queued. If False, the run will be queued.
143
+ """
144
+
145
+ def __post_init_post_parse__ (self ):
146
+ """Validations done after parsing the model."""
147
+
148
+ if self .priority is not None and (self .priority < 1 or self .priority > 10 ):
149
+ raise ValueError ("Priority must be between 1 and 10." )
150
+
151
+ if self .disabled is not None and self .disabled not in {True , False }:
152
+ raise ValueError ("Disabled must be a boolean value." )
153
+
154
+
131
155
class RunConfiguration (BaseModel ):
132
156
"""Configuration for an app run."""
133
157
@@ -139,6 +163,8 @@ class RunConfiguration(BaseModel):
139
163
"""Run type configuration for the run."""
140
164
secrets_collection_id : Optional [str ] = None
141
165
"""ID of the secrets collection to use for the run."""
166
+ queuing : Optional [RunQueueing ] = None
167
+ """Queueing configuration for the run."""
142
168
143
169
144
170
class ExternalRunResult (BaseModel ):
0 commit comments