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

pull/42/head
Zlatin Balevsky 2020-03-22 10:46:53 +00:00
parent 886effa3b6
commit 54f4874ad6
1 changed files with 2 additions and 0 deletions

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)