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

Function get_root_liveaction

st2common/st2common/services/action.py:459–476  ·  view source on GitHub ↗

Recursively ascends until the root liveaction is found Useful for finding an original parent workflow. Pass in any LiveActionDB instance, and this function will eventually return the top-most liveaction, even if the two are one and the same. :param liveaction_db: The LiveActionDB i

(liveaction_db)

Source from the content-addressed store, hash-verified

457
458
459def get_root_liveaction(liveaction_db):
460 """Recursively ascends until the root liveaction is found
461
462 Useful for finding an original parent workflow. Pass in any LiveActionDB instance,
463 and this function will eventually return the top-most liveaction, even if the two
464 are one and the same.
465
466 :param liveaction_db: The LiveActionDB instance for which to find the root parent.
467 :rtype: LiveActionDB
468 """
469
470 parent_liveaction_db = get_parent_liveaction(liveaction_db)
471
472 return (
473 get_root_liveaction(parent_liveaction_db)
474 if parent_liveaction_db
475 else liveaction_db
476 )
477
478
479def get_root_execution(execution_db):

Callers

nothing calls this directly

Calls 1

get_parent_liveactionFunction · 0.85

Tested by

no test coverage detected