Skip to content

Commit 4e654e1

Browse files
committed
fix: parent tasks sort to top above dependencies (#199)
1 parent 2749d88 commit 4e654e1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lua/overseer/component/dependencies.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ return {
4545
-- We will re-create them when this task runs again
4646
new_task:set_include_in_bundle(false)
4747
new_task:start()
48+
-- Ensure this task is marked as more recent than its dependencies
49+
task_list.touch_task(task)
4850
end)
4951
started_any = true
5052
if params.sequential then

lua/overseer/strategy/orchestrator.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ function OrchestratorStrategy:start(task)
239239
if section_complete(1) then
240240
self:start_next()
241241
end
242+
-- Ensure the orchestrator task is sorted more recent than all children
243+
task_list.touch_task(task)
242244
end)
243245
)
244246
end)

tests/manual/test_orchestrator.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local task = overseer.new_task({
1818
cmd = "echo checking nose cone && sleep 1 && echo checking fins && sleep 1 && echo checking heat shield && sleep 1 && echo checking payload && sleep 1 && echo checklist passed!",
1919
},
2020
},
21-
{ "shell", name = "Launch", cmd = "echo FWOOOOSH && sleep 2 && echo we\\'re in space" },
21+
{ "shell", name = "Launch", cmd = [[echo FWOOOOSH && sleep 2 && echo "we're in space"]] },
2222
},
2323
},
2424
})

0 commit comments

Comments
 (0)