From 85d10f677314bea16cd20479f6cd5f4095fa8ea2 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 9 Sep 2020 18:50:55 +0200 Subject: [PATCH] report published posts to statistics --- src/Hash2Pub/PostService.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Hash2Pub/PostService.hs b/src/Hash2Pub/PostService.hs index 02278bf..c6bac4a 100644 --- a/src/Hash2Pub/PostService.hs +++ b/src/Hash2Pub/PostService.hs @@ -637,7 +637,10 @@ processIncomingPosts serv = forever $ do -- collect async results results <- mapM waitCatch runningJobs - -- TODO: statistics + -- report the count of published posts for statistics + atomically . writeTQueue (statsQueue serv) $ StatsEvent PostPublishEvent (length . rights $ results) 0 -- hashtag published to doesn't matter + pure () + -- | process the pending fetch jobs of delivered post IDs: Delivered posts are tried to be fetched from their URI-ID