From 54f4874ad66bcbdef8a1bf6fb00a1d0e48c2b036 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sun, 22 Mar 2020 10:46:53 +0000 Subject: [PATCH] count the times a file has been hit due to feed update --- .../groovy/com/muwire/core/connection/ConnectionAcceptor.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy b/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy index 25b711c7..a8f9ac48 100644 --- a/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/ConnectionAcceptor.groovy @@ -574,7 +574,9 @@ class ConnectionAcceptor { DataOutputStream dos = new DataOutputStream(new GZIPOutputStream(os)) JsonOutput jsonOutput = new JsonOutput() + final long now = System.currentTimeMillis(); published.each { + it.hit(requestor, now, "Feed Update"); int certificates = certificateManager.getByInfoHash(new InfoHash(it.getRoot())).size() def obj = FeedItems.sharedFileToObj(it, certificates) def json = jsonOutput.toJson(obj)