Skip to content

Commit

Permalink
Remove code to close_db_connections
Browse files Browse the repository at this point in the history
  • Loading branch information
erick-otenyo committed Nov 11, 2024
1 parent e723ef7 commit 50aeca5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions geomanager/views/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from adminboundarymanager.models import AdminBoundarySettings
from django.contrib.gis.geos import GEOSGeometry, MultiPolygon
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection, close_old_connections
from django.db import connection
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
from django.urls import reverse
Expand Down Expand Up @@ -110,7 +110,6 @@ def get(self, request, table_name, z, x, y):
SELECT ST_AsMVT(mvtgeom, 'default') FROM mvtgeom;
"""

close_old_connections()
with connection.cursor() as cursor:
try:
cursor.execute(sql, (z, x, y))
Expand All @@ -135,7 +134,6 @@ def get_boundary_data_feature_by_id(request, table_name, gid):
res_data = GeostoreSerializer(geostore).data
return JsonResponse(res_data)

close_old_connections()
with connection.cursor() as cursor:
query = f"""
SELECT json_build_object(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = geomanager
version = 0.4.9
version = 0.5.0
description = Wagtail based Geospatial Data Manager
long_description = file:README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 50aeca5

Please sign in to comment.