From 244686aa33ed08c56f2257b5ae54999c5cf54669 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Sat, 30 Mar 2019 23:55:23 -0400 Subject: [PATCH] Move threadDelay --- src/PullWatch/PullWatch.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PullWatch/PullWatch.hs b/src/PullWatch/PullWatch.hs index 6ed92a8..6227b94 100644 --- a/src/PullWatch/PullWatch.hs +++ b/src/PullWatch/PullWatch.hs @@ -48,7 +48,7 @@ parseRepoArgs = withParseResult parseRepos -- Helper functions -tenMinutes = 300000000*2 +fiveMinutes = 300000000 getPRId = Just . fromIntegral . untagId . simplePullRequestId @@ -89,6 +89,8 @@ getLatest (Repo owner repo) = do let repoOwner = untagName owner return $ PR body title repoName repoOwner id + + threadDelay fiveMinutes return pr getLatestPRs :: (?pat :: (Maybe Auth.Auth)) => @@ -118,7 +120,6 @@ monitorPRs previous repos = do (mapM_ (notifyPR client)) ((map toNote) <$> difference) - threadDelay tenMinutes monitorPRs currentPRs repos -- Helper functions for converting to an IntMap