Skip to content

Commit

Permalink
Improve geoip updater to re-download less frequently on restarts.
Browse files Browse the repository at this point in the history
On restarts, we ended up re-downloading the geoip data file each time if
it was older than a day. This improves things so we now touch the file
any time we download it (even if the file contents are the same), so we
know it's been checked recently.
  • Loading branch information
GUI committed Jun 18, 2016
1 parent b332e9f commit 38d4654
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/api-umbrella-geoip-auto-updater
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ while true; do
echo "Reloading api-umbrella failed"
fi
fi

# Touch the file so we know we've checked it recently (even if we didn't
# replace it).
touch "$current_path"
fi
fi

Expand Down

0 comments on commit 38d4654

Please sign in to comment.