-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_literary_dag.exs
More file actions
30 lines (23 loc) · 907 Bytes
/
load_literary_dag.exs
File metadata and controls
30 lines (23 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env elixir
# Load the literary analysis DAG
alias Cascade.Examples.DAGLoader
IO.puts("\n=== Loading Literary Analysis DAG ===\n")
case DAGLoader.load_literary_analysis_dag() do
{:ok, dag} ->
IO.puts("✓ Literary Analysis DAG loaded successfully!")
IO.puts(" Name: #{dag.name}")
IO.puts(" Description: #{dag.description}")
IO.puts(" Version: #{dag.version}")
IO.puts(" Tasks: #{length(dag.definition["nodes"])}")
IO.puts(" Enabled: #{dag.enabled}")
IO.puts("\n=== Task List ===")
dag.definition["nodes"]
|> Enum.each(fn node ->
deps = if node["depends_on"], do: " (depends on: #{inspect(node["depends_on"])})", else: ""
IO.puts(" - #{node["id"]}: #{node["type"]}#{deps}")
end)
IO.puts("\n✓ DAG is ready for execution!")
{:error, reason} ->
IO.puts("✗ Failed to load DAG: #{inspect(reason)}")
System.halt(1)
end