diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-22 06:52:19 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-22 06:52:19 -0500 |
| commit | a4176da77f770adc1df599289d132bb7ac1d94d1 (patch) | |
| tree | 3255ca1d4d0e08d5e973fc104a917c3b94bdf451 /Omni/Task/Core.hs | |
| parent | f1bf5fab9b8f2d7960239264913bc21f34468ac2 (diff) | |
| parent | e77ece40698571d83385831a53cff49f6ccf432d (diff) | |
Merge branch 'live' into task/t-rWcmRMaWX.3
Diffstat (limited to 'Omni/Task/Core.hs')
| -rw-r--r-- | Omni/Task/Core.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs index 7bb8ef0..29aca85 100644 --- a/Omni/Task/Core.hs +++ b/Omni/Task/Core.hs @@ -367,15 +367,15 @@ createTask title taskType parent namespace priority deps description = pure task -- Update task status -updateTaskStatus :: Text -> Status -> IO () -updateTaskStatus tid newStatus = +updateTaskStatus :: Text -> Status -> [Dependency] -> IO () +updateTaskStatus tid newStatus newDeps = withTaskWriteLock <| do tasks <- loadTasksInternal now <- getCurrentTime let updatedTasks = map updateIfMatch tasks updateIfMatch t = if matchesId (taskId t) tid - then t {taskStatus = newStatus, taskUpdatedAt = now} + then t {taskStatus = newStatus, taskUpdatedAt = now, taskDependencies = if null newDeps then taskDependencies t else newDeps} else t -- Rewrite the entire file (simple approach for MVP) tasksFile <- getTasksFilePath |
