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

Function _decompose_liveaction

st2common/st2common/services/executions.py:81–92  ·  view source on GitHub ↗

Splits the liveaction into an ActionExecution compatible dict.

(liveaction_db)

Source from the content-addressed store, hash-verified

79
80
81def _decompose_liveaction(liveaction_db):
82 """
83 Splits the liveaction into an ActionExecution compatible dict.
84 """
85 decomposed = {"liveaction": {}}
86 liveaction_api = vars(LiveActionAPI.from_model(liveaction_db))
87 for k in liveaction_api.keys():
88 if k in LIVEACTION_ATTRIBUTES:
89 decomposed["liveaction"][k] = liveaction_api[k]
90 else:
91 decomposed[k] = getattr(liveaction_db, k)
92 return decomposed
93
94
95def _create_execution_log_entry(status, timestamp=None):

Callers 2

create_execution_objectFunction · 0.85
update_executionFunction · 0.85

Calls 2

keysMethod · 0.80
from_modelMethod · 0.45

Tested by

no test coverage detected