Skip to content

Commit

Permalink
fix: corrected redis keys to expire
Browse files Browse the repository at this point in the history
Without expiring, a success will sit in the cache forever
  • Loading branch information
amunchet committed Jan 26, 2024
1 parent 957c857 commit 74c40e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,7 @@ def insert_metric(inp=""):

name = json.dumps({"name" : item["name"], "tags" : item["tags"]}, default=str)
a.set(f"METRIC-{name}", json.dumps(item, default=str))
a.expire(f"METRIC-{name}", 120)

return "Success", 200

Expand Down

0 comments on commit 74c40e1

Please sign in to comment.