🚀 feat(custom_component.py): add method list_flow_names() to retrieve a list of flow names from the database
🐛 fix(custom_component.py): remove unused build() method to improve code cleanliness and avoid confusion
This commit is contained in:
parent
67e12c425f
commit
cf688adf53
1 changed files with 5 additions and 0 deletions
|
|
@ -147,5 +147,10 @@ class CustomComponent(Component, extra=Extra.allow):
|
||||||
raise ValueError(f"Flow {flow_id} not found")
|
raise ValueError(f"Flow {flow_id} not found")
|
||||||
return build_sorted_vertices_with_caching(data_graph)
|
return build_sorted_vertices_with_caching(data_graph)
|
||||||
|
|
||||||
|
def list_flow_names(self):
|
||||||
|
with session_getter() as session:
|
||||||
|
flows = session.query(Flow).all()
|
||||||
|
return [flow.name for flow in flows]
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue