report incoming relay posts to statistics
This commit is contained in:
parent
85d10f6773
commit
620e998876
|
@ -185,8 +185,10 @@ relayInbox serv tag posts = do
|
||||||
-- if noone subscribed to the tag, nothing needs to be done
|
-- if noone subscribed to the tag, nothing needs to be done
|
||||||
(pure ())
|
(pure ())
|
||||||
-- otherwise enqueue posts into broadcast queue of the tag
|
-- otherwise enqueue posts into broadcast queue of the tag
|
||||||
(\queue ->
|
(\queue -> do
|
||||||
liftIO $ forM_ postIDs (atomically . writeTChan queue)
|
liftIO $ forM_ postIDs (atomically . writeTChan queue)
|
||||||
|
-- report the received post for statistic purposes
|
||||||
|
liftIO . atomically . writeTQueue (statsQueue serv) $ StatsEvent RelayReceiveEvent (length postIDs) (hashtagToId tag)
|
||||||
)
|
)
|
||||||
broadcastChan
|
broadcastChan
|
||||||
pure NoContent
|
pure NoContent
|
||||||
|
|
Loading…
Reference in a new issue