diff options
| -rw-r--r-- | api/routes/locations.py | 1 | ||||
| -rw-r--r-- | api/routes/measures.py | 1 | ||||
| -rw-r--r-- | api/routes/readings.py | 1 | ||||
| -rw-r--r-- | api/routes/sensors.py | 1 | ||||
| -rw-r--r-- | api/routes/stations.py | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/api/routes/locations.py b/api/routes/locations.py index a2e4dc6..744fa7f 100644 --- a/api/routes/locations.py +++ b/api/routes/locations.py @@ -25,6 +25,7 @@ async def get_locations(): } dc['locations'].append(l) dc['size'] = len(dc['locations']) + session.close() return dc diff --git a/api/routes/measures.py b/api/routes/measures.py index f98c203..195da9a 100644 --- a/api/routes/measures.py +++ b/api/routes/measures.py @@ -22,4 +22,5 @@ async def get_measures(): } dc['measures'].append(mem) dc['size'] = len(dc['measures']) + session.close() return dc diff --git a/api/routes/readings.py b/api/routes/readings.py index 957106c..59af328 100644 --- a/api/routes/readings.py +++ b/api/routes/readings.py @@ -24,5 +24,6 @@ async def get_readings(): } dc['readings'].append(re) dc['size'] = len(dc['readings']) + session.close() return dc diff --git a/api/routes/sensors.py b/api/routes/sensors.py index 18e0f84..89744e3 100644 --- a/api/routes/sensors.py +++ b/api/routes/sensors.py @@ -24,4 +24,5 @@ async def get_sensors(): } dc['sensors'].append(dev) dc['size'] = len(dc['sensors']) + session.close() return dc diff --git a/api/routes/stations.py b/api/routes/stations.py index 62e2643..00a5fa8 100644 --- a/api/routes/stations.py +++ b/api/routes/stations.py @@ -30,4 +30,5 @@ async def get_stations(): } dc['stations'].append(stat) dc['size'] = len(dc['stations']) + session.close() return dc |
