Add purging metrics on timer.

This commit is contained in:
2023-11-17 13:47:54 +00:00
parent 1a790ffb52
commit 105c624426
5 changed files with 20 additions and 3 deletions
+1
View File
@@ -56,6 +56,7 @@ func parseConfig() {
c.Server.ApiPort = envutil.GetInt("API_PORT", 9090)
c.Api.BannedUsersFile = envutil.Getenv("BANNED_USERS_FILE", "/go/src/app/banned_users.json")
c.Server.PurgeOnCrawl = envutil.GetBool("PURGE_METRICS_ON_CRAWL", false)
c.Server.PurgeEvery = envutil.GetInt("PURGE_METRICS_ON_TIMER", 0)
cfg = &c
enableCache() // takes close to no resources, but can be used with dynamic query cache
loadRatelimitConfig()