Browse Source

Move threadDelay

master
Wesley Kerfoot 6 years ago
parent
commit
244686aa33
  1. 5
      src/PullWatch/PullWatch.hs

5
src/PullWatch/PullWatch.hs

@ -48,7 +48,7 @@ parseRepoArgs = withParseResult parseRepos
-- Helper functions -- Helper functions
tenMinutes = 300000000*2 fiveMinutes = 300000000
getPRId = Just . fromIntegral . untagId . simplePullRequestId getPRId = Just . fromIntegral . untagId . simplePullRequestId
@ -89,6 +89,8 @@ getLatest (Repo owner repo) = do
let repoOwner = untagName owner let repoOwner = untagName owner
return $ PR body title repoName repoOwner id return $ PR body title repoName repoOwner id
threadDelay fiveMinutes
return pr return pr
getLatestPRs :: (?pat :: (Maybe Auth.Auth)) => getLatestPRs :: (?pat :: (Maybe Auth.Auth)) =>
@ -118,7 +120,6 @@ monitorPRs previous repos = do
(mapM_ (notifyPR client)) (mapM_ (notifyPR client))
((map toNote) <$> difference) ((map toNote) <$> difference)
threadDelay tenMinutes
monitorPRs currentPRs repos monitorPRs currentPRs repos
-- Helper functions for converting to an IntMap -- Helper functions for converting to an IntMap

Loading…
Cancel
Save