summaryrefslogtreecommitdiff
path: root/src/Job.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-01-18 21:27:06 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-01-19 18:23:43 +0100
commit2e69f4239223b41ada346c340f058ca91342781e (patch)
treeeb924bb9aae1805b1df71dc1d776ffd1aed4a06c /src/Job.hs
parent1ecc43458cd5c4f41fb23948c48e429e376704a5 (diff)
Watch branches and tags in git repositories
Diffstat (limited to 'src/Job.hs')
-rw-r--r--src/Job.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Job.hs b/src/Job.hs
index 990ea3e..71da738 100644
--- a/src/Job.hs
+++ b/src/Job.hs
@@ -179,7 +179,7 @@ runManagedJob JobManager {..} tid cancel job = bracket acquire release $ \case
runJobs :: JobManager -> Commit -> [ Job ] -> IO [ ( Job, TVar (JobStatus JobOutput) ) ]
runJobs mngr@JobManager {..} commit jobs = do
- treeId <- readTreeId commit
+ treeId <- getTreeId commit
results <- atomically $ do
forM jobs $ \job -> do
let jid = JobId [ JobIdTree treeId, JobIdName (jobName job) ]
@@ -285,7 +285,7 @@ prepareJob dir commit job inner = do
flip finally (liftIO $ removeDirectoryRecursive checkoutPath) $ do
checkoutAt commit checkoutPath
- tid <- readTreeId commit
+ tid <- getTreeId commit
let jdir = dir </> "jobs" </> showTreeId tid </> stringJobName (jobName job)
liftIO $ createDirectoryIfMissing True jdir