Skip to content
Snippets Groups Projects
Commit d600731c authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Fix workflow task parsing

parent a5200aa5
No related branches found
No related tags found
No related merge requests found
name = "FACT_workflow_manager" name = "FACT_workflow_manager"
uuid = "34b7aff1-f91f-4b8b-9a3d-d0a54f07d855" uuid = "34b7aff1-f91f-4b8b-9a3d-d0a54f07d855"
authors = ["Riccardo Boero <ribo@nilu.no>"] authors = ["Riccardo Boero <ribo@nilu.no>"]
version = "0.0.9" version = "0.0.10"
[deps] [deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
......
...@@ -110,12 +110,11 @@ system = ServiceRegistry() # Assuming ServiceRegistry is preconfigured ...@@ -110,12 +110,11 @@ system = ServiceRegistry() # Assuming ServiceRegistry is preconfigured
manage_workflow(tasks_list, results_container, system) manage_workflow(tasks_list, results_container, system)
``` ```
""" """
function manage_workflow(tasks_list::Vector{Dict}, results_container::Dict, system::OrchestratorRegistry.ServiceRegistry) function manage_workflow(tasks_list::Vector{Dict}, results_container::Dict, system::OrchestratorRegistry.ServiceRegistry)
overwrite = true overwrite = true
update_condition = Atomic{Bool}(false) # Flag for saving updates update_condition = Atomic{Bool}(false) # Flag for saving updates
# Convert tasks_list (Vector) into a Dict for easy access by task id # Convert tasks_list into a dictionary for dependency resolution
tasks = Dict(task["id"] => task for task in tasks_list) tasks = Dict(task["id"] => task for task in tasks_list)
# Initialize a Dict to hold Channels for each task # Initialize a Dict to hold Channels for each task
...@@ -171,4 +170,3 @@ function manage_workflow(tasks_list::Vector{Dict}, results_container::Dict, syst ...@@ -171,4 +170,3 @@ function manage_workflow(tasks_list::Vector{Dict}, results_container::Dict, syst
foreach(wait, task_handles) foreach(wait, task_handles)
println("All tasks completed.") println("All tasks completed.")
end end
...@@ -60,7 +60,7 @@ function parseWorkflow(filePath::String) ...@@ -60,7 +60,7 @@ function parseWorkflow(filePath::String)
task_details["id"] = task_name task_details["id"] = task_name
push!(tasks, task_details) push!(tasks, task_details)
else else
println("Skipping non-dictionary task entry: '$task_name'. Value: ", task_details) #println("Skipping non-dictionary task entry: '$task_name'. Value: ", task_details)
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment