MCPcopy Create free account
hub / github.com/StackStorm/st2 / ActionExecutionOutputDB

Class ActionExecutionOutputDB

st2common/st2common/models/db/execution.py:182–218  ·  view source on GitHub ↗

Stores output of a particular execution. New document is inserted dynamically when a new chunk / line is received which means you can simulate tail behavior by periodically reading from this collection. Attribute: execution_id: ID of the execution to which this output belo

Source from the content-addressed store, hash-verified

180
181
182class ActionExecutionOutputDB(stormbase.StormFoundationDB):
183 """
184 Stores output of a particular execution.
185
186 New document is inserted dynamically when a new chunk / line is received which means you can
187 simulate tail behavior by periodically reading from this collection.
188
189 Attribute:
190 execution_id: ID of the execution to which this output belongs.
191 action_ref: Parent action reference.
192 runner_ref: Parent action runner reference.
193 timestamp: Timestamp when this output has been produced / received.
194 output_type: Type of the output (e.g. stdout, stderr, output)
195 data: Actual output data. This could either be line, chunk or similar, depending on the
196 runner.
197 """
198
199 execution_id = me.StringField(required=True)
200 action_ref = me.StringField(required=True)
201 runner_ref = me.StringField(required=True)
202 timestamp = ComplexDateTimeField(
203 required=True, default=date_utils.get_datetime_utc_now
204 )
205 output_type = me.StringField(required=True, default="output")
206 delay = me.IntField()
207
208 data = me.StringField()
209
210 meta = {
211 "indexes": [
212 {"fields": ["execution_id"]},
213 {"fields": ["action_ref"]},
214 {"fields": ["runner_ref"]},
215 {"fields": ["timestamp"]},
216 {"fields": ["output_type"]},
217 ]
218 }
219
220
221MODELS = [ActionExecutionDB, ActionExecutionOutputDB]

Calls 1