ソースを参照

fix: respect visit limit

poeti8 6 年 前
コミット
82905d056e
1 ファイル変更2 行追加0 行削除
  1. 2 0
      server/queues.ts

+ 2 - 0
server/queues.ts

@@ -29,6 +29,8 @@ visitQueue.process(({ data }) => {
   const location = geoip.lookup(data.realIP);
   const country = location && location.country;
 
+  if (data.visit_count > getStatsLimit()) return;
+
   return Promise.all([
     addLinkCount(data.link.id),
     createVisit({