Increment GRFS downloads metric
All checks were successful
Amarillo/amarillo-gitea/amarillo-grfs-export/pipeline/head This commit looks good

This commit is contained in:
Csaba 2024-02-19 09:58:58 +01:00
parent 3ee4478cfc
commit 2c1190adb6

View file

@ -42,6 +42,11 @@ def _assert_region_exists(region_id: str) -> Region:
)
async def get_file(region_id: str, user: str = Depends(verify_admin_api_key)):
_assert_region_exists(region_id)
try:
from amarillo.plugins.metrics import increment_grfs_download_counter
increment_grfs_download_counter()
except ImportError:
pass
return FileResponse(f'data/grfs/amarillo.{region_id}.gtfs.zip')
@router.get("/region/{region_id}/grfs-rt/",