|
1 | 1 | from asyncio import gather |
2 | 2 | from collections.abc import Iterable, Mapping |
3 | | -from logging import getLogger |
4 | 3 | from pathlib import Path |
5 | 4 | from typing import Any, cast |
6 | 5 |
|
|
10 | 9 | from pydantic import DirectoryPath, FilePath, HttpUrl |
11 | 10 |
|
12 | 11 | from .config import Config |
| 12 | +from .opentelemetry import traced |
13 | 13 | from .path import RESOURCES_DIRECTORY |
14 | 14 | from .skeleton import Skeleton |
15 | 15 | from .util import read_json, reverse_geocode |
16 | 16 |
|
17 | | -_LOGGER = getLogger(__name__) |
18 | | - |
19 | 17 |
|
| 18 | +@traced |
20 | 19 | async def read_station_information( |
21 | 20 | *, |
22 | 21 | http_client: httpx.AsyncClient, |
@@ -73,6 +72,7 @@ async def read_station_information( |
73 | 72 | ).drop(columns=coordinates_column_names) |
74 | 73 |
|
75 | 74 |
|
| 75 | +@traced |
76 | 76 | async def read_station_status( |
77 | 77 | velib_data_base_path: HttpUrl | Path, |
78 | 78 | /, |
@@ -106,14 +106,14 @@ async def read_station_status( |
106 | 106 | return pd.DataFrame(station_statuses) |
107 | 107 |
|
108 | 108 |
|
| 109 | +@traced |
109 | 110 | async def load_tables( |
110 | 111 | session: tt.Session, |
111 | 112 | /, |
112 | 113 | *, |
113 | 114 | config: Config, |
114 | 115 | http_client: httpx.AsyncClient, |
115 | 116 | ) -> None: |
116 | | - _LOGGER.info("Loading tables.") |
117 | 117 | if config.data_refresh_period is None: |
118 | 118 | reverse_geocoding_path: HttpUrl | FilePath = ( |
119 | 119 | RESOURCES_DIRECTORY / "station_location.csv" |
@@ -151,4 +151,3 @@ async def load_tables( |
151 | 151 | station_status_df |
152 | 152 | ), |
153 | 153 | ) |
154 | | - _LOGGER.info("Tables loaded.") |
0 commit comments