Skip to content

Commit

Permalink
Delete cache for monitors metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Jan 10, 2025
1 parent 76226c6 commit 58d42ce
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion availability.json

This file was deleted.

4 changes: 1 addition & 3 deletions lib/uplink/availability.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ defmodule Uplink.Availability do

Metrics.query!(monitor, query)
|> case do
%{status: 200, body: %{"responses" => responses} = body} ->
File.write!("availability.json", Jason.encode!(body))

%{status: 200, body: %{"responses" => responses}} ->
resources =
nodes
|> Response.parse(responses)
Expand Down
1 change: 1 addition & 0 deletions test/uplink/availability/router_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ defmodule Uplink.Availability.RouterTest do
File.read!("test/fixtures/elastic/availability.json")

Cache.delete(:cluster_members)
Cache.delete({:monitors, :metrics})

{:ok,
bypass: bypass,
Expand Down
1 change: 1 addition & 0 deletions test/uplink/availability_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ defmodule Uplink.AvailabilityTest do
File.read!("test/fixtures/elastic/availability.json")

Cache.delete(:cluster_members)
Cache.delete({:monitors, :metrics})

{:ok,
bypass: bypass,
Expand Down

0 comments on commit 58d42ce

Please sign in to comment.