Skip to content

Commit

Permalink
Change logs
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-morvan committed Sep 20, 2024
1 parent b6b9ea3 commit 58b2f4b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions geoportal/c2cgeoportal_geoportal/views/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ def get_http_cached(

@CACHE_OGC_SERVER_REGION.cache_on_arguments() # type: ignore
def do_get_http_cached(url: str) -> Tuple[bytes, str]:
LOG.info("Getting URL '%s'", url)
response = requests.get(url, headers=headers, timeout=TIMEOUT, **http_options)
response.raise_for_status()
LOG.info("Get URL '%s' in %.1fs.", url, response.elapsed.total_seconds())
LOG.info("Got URL '%s' in %.1fs.", url, response.elapsed.total_seconds())
return response.content, response.headers.get("Content-Type", "")

if cache:
Expand Down Expand Up @@ -184,7 +185,7 @@ def _get_metadata_list(self, item: main.TreeItem, errors: Set[str]) -> Dict[str,
async def _wms_getcap(
self, ogc_server: main.OGCServer, preload: bool = False, cache: bool = True
) -> Tuple[Optional[Dict[str, Dict[str, Any]]], Set[str]]:
LOG.debug("Get the WMS Capabilities of '%s', preload: %s, cache: %s", ogc_server.name, preload, cache)
# LOG.debug("Get the WMS Capabilities of '%s', preload: %s, cache: %s", ogc_server.name, preload, cache)

@CACHE_OGC_SERVER_REGION.cache_on_arguments() # type: ignore
def build_web_map_service(ogc_server_id: int) -> Tuple[Optional[Dict[str, Dict[str, Any]]], Set[str]]:
Expand Down Expand Up @@ -272,7 +273,7 @@ async def _wms_getcap_cached(
},
)

LOG.debug("Get WMS GetCapabilities for URL: %s", url)
# LOG.debug("Get WMS GetCapabilities for URL: %s", url)

headers = {}

Expand Down

0 comments on commit 58b2f4b

Please sign in to comment.