count the times a file has been hit due to feed update

This commit is contained in:
Zlatin Balevsky
2020-03-22 10:46:53 +00:00
parent 886effa3b6
commit 54f4874ad6

View File

@@ -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)