diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-07-28 21:29:37 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-07-28 21:29:37 +0200 |
commit | ba50676a1fe66c5f24f251984f2cb49c0e98aead (patch) | |
tree | 3b1b9a98d3df18c7fb197090c3b954cb168372ff /src/Test.hs | |
parent | 9615085b1427efe616302af4e9887f7cb84a9a0c (diff) |
Service: wait with output after head commit
Diffstat (limited to 'src/Test.hs')
-rw-r--r-- | src/Test.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Test.hs b/src/Test.hs index 19d1a64..8c26f5e 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -122,11 +122,11 @@ pairingAttributes _ out peers prefix = PairingAttributes , pairingHookResponse = \confirm -> do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-response", index, confirm] + afterCommit $ outLine out $ unwords [prefix ++ "-response", index, confirm] , pairingHookRequestNonce = \confirm -> do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-request", index, confirm] + afterCommit $ outLine out $ unwords [prefix ++ "-request", index, confirm] , pairingHookRequestNonceFailed = failed "nonce" @@ -135,11 +135,11 @@ pairingAttributes _ out peers prefix = PairingAttributes , pairingHookAcceptedResponse = do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-response-done", index] + afterCommit $ outLine out $ unwords [prefix ++ "-response-done", index] , pairingHookAcceptedRequest = do index <- show <$> getPeerIndex peers - liftIO $ outLine out $ unwords [prefix ++ "-request-done", index] + afterCommit $ outLine out $ unwords [prefix ++ "-request-done", index] , pairingHookFailed = \case PairingUserRejected -> failed "user" @@ -160,7 +160,7 @@ pairingAttributes _ out peers prefix = PairingAttributes _ -> fail "unexpected pairing state" index <- show <$> getPeerIndex peers - liftIO $ outLine out $ prefix ++ "-" ++ ptype ++ "-failed " ++ index ++ " " ++ detail + afterCommit $ outLine out $ prefix ++ "-" ++ ptype ++ "-failed " ++ index ++ " " ++ detail strState :: PairingState a -> String strState = \case |