support for multiple cache purge ips in stats parsing

This commit is contained in:
Kyle Drake 2017-06-16 22:21:58 -07:00
parent b80c4a98a2
commit 5c2f56e0b6
3 changed files with 8 additions and 4 deletions

View file

@ -19,7 +19,7 @@ class Stat < Sequel::Model
def parse_logfiles(path)
total_site_stats = {}
cache_control_ip = $config['cache_control_ip']
cache_control_ips = $config['cache_control_ips']
Dir["#{path}/*.log"].each do |log_path|
site_logs = {}
@ -34,7 +34,7 @@ class Stat < Sequel::Model
time, username, size, path, ip, referrer = hit_array
next if ip == cache_control_ip
next if cache_control_ips.include?(ip)
log_time = Time.parse time