-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GBFS : ne pas stocker de metrics pour 404 (#3484)
* GBFS : pas de cache/telemetry pour catch-all 404 * Don't use Transport.Telemetry * Add migration to delete rows * Should stay public for now
- Loading branch information
1 parent
d94798b
commit 026cca8
Showing
5 changed files
with
64 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
apps/transport/priv/repo/migrations/20230925124412_gbfs_metrics_remove_404_rows.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule DB.Repo.Migrations.GbfsMetricsRemove404Rows do | ||
use Ecto.Migration | ||
|
||
def up do | ||
# See https://github.com/etalab/transport-site/issues/3483 | ||
execute """ | ||
delete from metrics | ||
where period >= '2023-09-15'::date and target in ( | ||
'gbfs:city_name_lowercase', 'gbfs:foo', | ||
'gbfs:valence', 'gbfs:montpellier', 'gbfs:rouen', 'gbfs:marseille', 'gbfs:strasbourg' | ||
) | ||
""" | ||
end | ||
|
||
def down do | ||
IO.puts "no going back" | ||
end | ||
end |