Debug logs for periodic delivery
This commit is contained in:
parent
48cfccd3d2
commit
d70d34bb6b
1 changed files with 44 additions and 0 deletions
|
@ -1753,15 +1753,47 @@ retryOutboxDelivery = do
|
||||||
deleteWhere [ForwardingId <-. forwardingOld]
|
deleteWhere [ForwardingId <-. forwardingOld]
|
||||||
return (groupUnlinked lonelyNew, groupLinked linkedNew, groupForwarding forwardingNew)
|
return (groupUnlinked lonelyNew, groupLinked linkedNew, groupForwarding forwardingNew)
|
||||||
let deliver = deliverHttp
|
let deliver = deliverHttp
|
||||||
|
logInfo "Periodic delivery prepared DB, starting async HTTP POSTs"
|
||||||
|
|
||||||
|
logDebug $
|
||||||
|
"Periodic delivery forking linked " <>
|
||||||
|
T.pack (show $ map (snd . fst) dls)
|
||||||
waitsDL <- traverse (fork . deliverLinked deliver now) dls
|
waitsDL <- traverse (fork . deliverLinked deliver now) dls
|
||||||
|
|
||||||
|
logDebug $
|
||||||
|
"Periodic delivery forking forwarding " <>
|
||||||
|
T.pack (show $ map (snd . fst) fws)
|
||||||
waitsFW <- traverse (fork . deliverForwarding now) fws
|
waitsFW <- traverse (fork . deliverForwarding now) fws
|
||||||
|
|
||||||
|
logDebug $
|
||||||
|
"Periodic delivery forking unlinked " <>
|
||||||
|
T.pack (show $ map (snd . fst) udls)
|
||||||
waitsUDL <- traverse (fork . deliverUnlinked deliver now) udls
|
waitsUDL <- traverse (fork . deliverUnlinked deliver now) udls
|
||||||
|
|
||||||
|
logDebug $
|
||||||
|
T.concat
|
||||||
|
[ "Periodic delivery waiting for ", T.pack $ show $ length waitsDL
|
||||||
|
, " linked"
|
||||||
|
]
|
||||||
resultsDL <- sequence waitsDL
|
resultsDL <- sequence waitsDL
|
||||||
unless (and resultsDL) $ logError "Periodic delivery DL error"
|
unless (and resultsDL) $ logError "Periodic delivery DL error"
|
||||||
|
|
||||||
|
logDebug $
|
||||||
|
T.concat
|
||||||
|
[ "Periodic delivery waiting for ", T.pack $ show $ length waitsFW
|
||||||
|
, " forwarding"
|
||||||
|
]
|
||||||
resultsFW <- sequence waitsFW
|
resultsFW <- sequence waitsFW
|
||||||
unless (and resultsFW) $ logError "Periodic delivery FW error"
|
unless (and resultsFW) $ logError "Periodic delivery FW error"
|
||||||
|
|
||||||
|
logDebug $
|
||||||
|
T.concat
|
||||||
|
[ "Periodic delivery waiting for "
|
||||||
|
, T.pack $ show $ length waitsUDL, " unlinked"
|
||||||
|
]
|
||||||
resultsUDL <- sequence waitsUDL
|
resultsUDL <- sequence waitsUDL
|
||||||
unless (and resultsUDL) $ logError "Periodic delivery UDL error"
|
unless (and resultsUDL) $ logError "Periodic delivery UDL error"
|
||||||
|
|
||||||
logInfo "Periodic delivery done"
|
logInfo "Periodic delivery done"
|
||||||
where
|
where
|
||||||
adaptUnlinked
|
adaptUnlinked
|
||||||
|
@ -1830,7 +1862,11 @@ retryOutboxDelivery = do
|
||||||
return False
|
return False
|
||||||
Right success -> return success
|
Right success -> return success
|
||||||
deliverLinked deliver now ((_, h), recips) = do
|
deliverLinked deliver now ((_, h), recips) = do
|
||||||
|
logDebug $ "Periodic deliver starting linked for host " <> h
|
||||||
waitsR <- for recips $ \ ((raid, (ident, inbox)), delivs) -> fork $ do
|
waitsR <- for recips $ \ ((raid, (ident, inbox)), delivs) -> fork $ do
|
||||||
|
logDebug $
|
||||||
|
"Periodic deliver starting linked for actor " <>
|
||||||
|
renderFedURI (l2f h ident)
|
||||||
waitsD <- for delivs $ \ (dlid, fwd, doc) -> fork $ do
|
waitsD <- for delivs $ \ (dlid, fwd, doc) -> fork $ do
|
||||||
let fwd' = if fwd then Just ident else Nothing
|
let fwd' = if fwd then Just ident else Nothing
|
||||||
e <- deliver doc fwd' h inbox
|
e <- deliver doc fwd' h inbox
|
||||||
|
@ -1858,7 +1894,11 @@ retryOutboxDelivery = do
|
||||||
logError $ "Periodic DL delivery error for host " <> h
|
logError $ "Periodic DL delivery error for host " <> h
|
||||||
return True
|
return True
|
||||||
deliverUnlinked deliver now ((iid, h), recips) = do
|
deliverUnlinked deliver now ((iid, h), recips) = do
|
||||||
|
logDebug $ "Periodic deliver starting unlinked for host " <> h
|
||||||
waitsR <- for recips $ \ ((uraid, luRecip), delivs) -> fork $ do
|
waitsR <- for recips $ \ ((uraid, luRecip), delivs) -> fork $ do
|
||||||
|
logDebug $
|
||||||
|
"Periodic deliver starting unlinked for actor " <>
|
||||||
|
renderFedURI (l2f h luRecip)
|
||||||
e <- fetchRemoteActor iid h luRecip
|
e <- fetchRemoteActor iid h luRecip
|
||||||
case e of
|
case e of
|
||||||
Right (Right (Entity raid ra)) -> do
|
Right (Right (Entity raid ra)) -> do
|
||||||
|
@ -1888,7 +1928,11 @@ retryOutboxDelivery = do
|
||||||
logError $ "Periodic UDL delivery error for host " <> h
|
logError $ "Periodic UDL delivery error for host " <> h
|
||||||
return True
|
return True
|
||||||
deliverForwarding now ((_, h), recips) = do
|
deliverForwarding now ((_, h), recips) = do
|
||||||
|
logDebug $ "Periodic deliver starting forwarding for host " <> h
|
||||||
waitsR <- for recips $ \ ((raid, inbox), delivs) -> fork $ do
|
waitsR <- for recips $ \ ((raid, inbox), delivs) -> fork $ do
|
||||||
|
logDebug $
|
||||||
|
"Periodic deliver starting forwarding for inbox " <>
|
||||||
|
renderFedURI (l2f h inbox)
|
||||||
waitsD <- for delivs $ \ (fwid, body, sender, sig) -> fork $ do
|
waitsD <- for delivs $ \ (fwid, body, sender, sig) -> fork $ do
|
||||||
e <- forwardActivity (l2f h inbox) sig sender body
|
e <- forwardActivity (l2f h inbox) sig sender body
|
||||||
case e of
|
case e of
|
||||||
|
|
Loading…
Reference in a new issue