Skip to content

Commit

Permalink
src: Run GeoIP file MD5 checks hourly and do GC manually
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelioniskis committed Oct 1, 2024
1 parent 7ac2237 commit 948c375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/razor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Razor
end

def mainLoop
Schedule.every(5.seconds) do
Schedule.every(1.hour) do
geoip_db_check
end

Expand Down Expand Up @@ -143,6 +143,7 @@ class Razor
digest = Digest::MD5.digest do |ctx|
ctx.update File.read(@geoip_db_path)
end
GC.collect
digest.to_slice.hexstring
end

Expand Down

0 comments on commit 948c375

Please sign in to comment.