fix: make Langflow-synced flows visible (lfx volume perms, pull dedup)

This commit is contained in:
Jonas Miederer 2026-09-25 08:19:42 +02:00
parent 1326cece42
commit 95a1c1afb7
12 changed files with 5460 additions and 3859 deletions

View file

@ -49,7 +49,12 @@ async def pull_all_from_langflow(
try:
exported = await langflow.export_flow(flow_id)
doc = normalize_exported_flow(exported, flow_id)
path = export.write_flow_file(flows_dir, doc, name=doc["name"])
reuse, identical = export.find_reuse_path(flows_dir, doc)
if identical and reuse is not None:
pulled.append(reuse.stem)
continue
target = reuse or export.flow_path(flows_dir, export.slugify(doc["name"]))
path = export.write_flow_bytes(target, doc)
pulled.append(path.stem)
except (LangflowError, OSError, ValueError) as exc:
errors[flow_id] = str(exc)