Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Workflow Manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Utils
FACT Workflow Manager
Commits
38b16695
Commit
38b16695
authored
3 months ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Fix workflow task parsing
parent
d600731c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Project.toml
+1
-1
1 addition, 1 deletion
Project.toml
src/Runner.jl
+7
-3
7 additions, 3 deletions
src/Runner.jl
with
8 additions
and
4 deletions
Project.toml
+
1
−
1
View file @
38b16695
name
=
"FACT_workflow_manager"
uuid
=
"34b7aff1-f91f-4b8b-9a3d-d0a54f07d855"
authors
=
[
"Riccardo Boero <ribo@nilu.no>"
]
version
=
"0.0.1
0
"
version
=
"0.0.1
1
"
[deps]
DataFrames
=
"a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
...
...
This diff is collapsed.
Click to expand it.
src/Runner.jl
+
7
−
3
View file @
38b16695
...
...
@@ -111,12 +111,12 @@ manage_workflow(tasks_list, results_container, system)
```
"""
function
manage_workflow
(
tasks_list
::
Vector
{
Dict
},
results_container
::
Dict
,
system
::
OrchestratorRegistry
.
ServiceRegistry
)
overwrite
=
true
update_condition
=
Atomic
{
Bool
}(
false
)
# Flag for saving updates
# Convert tasks_list into a dictionary for dependency resolution
tasks
=
Dict
(
task
[
"id"
]
=>
task
for
task
in
tasks_list
)
overwrite
=
true
update_condition
=
Atomic
{
Bool
}(
false
)
# Flag for saving updates
# Initialize a Dict to hold Channels for each task
task_channels
=
Dict
{
String
,
Channel
{
Bool
}}()
for
task_id
in
keys
(
tasks
)
...
...
@@ -149,6 +149,10 @@ function manage_workflow(tasks_list::Vector{Dict}, results_container::Dict, syst
# Wait for dependencies
if
haskey
(
task_info
,
"dependencies"
)
&&
!
isempty
(
task_info
[
"dependencies"
])
for
dep
in
task_info
[
"dependencies"
]
# Check that the dependency exists in task_channels
if
!
haskey
(
task_channels
,
dep
)
error
(
"Dependency
$
dep not found in task channels for task
$
task_id."
)
end
take!
(
task_channels
[
dep
])
put!
(
task_channels
[
dep
],
true
)
# Reput the signal for other tasks
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment