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

Fix empty deps list in tasks

parent c04da1fb
No related branches found
No related tags found
No related merge requests found
name = "FACT_workflow_manager"
uuid = "34b7aff1-f91f-4b8b-9a3d-d0a54f07d855"
authors = ["Riccardo Boero <ribo@nilu.no>"]
version = "0.0.5"
version = "0.0.6"
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
......
......@@ -97,6 +97,7 @@ println("Results container needs saving: ", update_needed[])
This example demonstrates how tasks are executed respecting dependencies, with access to services provided by the registry.
"""
function manage_workflow(tasks::Dict, results_container::Dict, system::OrchestratorRegistry.ServiceRegistry)
overwrite = true
# Flag to return whether there is a need to save an updated image of FACTResultsIO
update_condition = Atomic{Bool}(false)
......@@ -117,8 +118,14 @@ function manage_workflow(tasks::Dict, results_container::Dict, system::Orchestra
try
# Prepare the dependencies information beforehand
dependencies_info = Dict{String, Dict}()
for dep in task_info["dependencies"]
dependencies_info[dep] = tasks[dep]
if haskey(task_info, "dependencies") && !isempty(task_info["dependencies"])
for dep in task_info["dependencies"]
if haskey(tasks, dep)
dependencies_info[dep] = tasks[dep]
else
#println("Warning: Dependency $dep not found in tasks.")
end
end
end
# Check if the task has dependencies and wait for them if it does
if haskey(task_info, "dependencies") && !isempty(task_info["dependencies"])
......
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