Skip to content

Commit

Permalink
Merge branch 'dev' into josh/preps
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdh committed Dec 11, 2024
2 parents 094066d + b1022cc commit 421b85e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.16.3 (2024-11-25)

### Fix

- decrease total response timeout to 5s for mss status check

## v0.16.2 (2024-07-22)

### Fix
Expand Down
8 changes: 5 additions & 3 deletions iiif/profiles/mss.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import shutil
import tempfile
import time
from aiohttp import ClientResponse, ClientError
from aiohttp import ClientResponse, ClientError, ClientTimeout
from cachetools import TTLCache
from contextlib import asynccontextmanager
from dataclasses import dataclass
Expand Down Expand Up @@ -438,7 +438,8 @@ async def get_status(self) -> dict:
try:
health_url = f'{next(self.es_hosts)}/_cluster/health'
start_time = time.monotonic()
async with self.es_session.get(health_url) as response:
async with self.es_session.get(health_url,
timeout=ClientTimeout(total=5)) as response:
return {
'status': (await response.json())['status'],
'response_time': time.monotonic() - start_time
Expand Down Expand Up @@ -639,7 +640,8 @@ async def get_status(self) -> dict:
status['error_breakdown'] = self.stream_errors
try:
start_time = time.monotonic()
async with self.mss_session.get('/nhmlive/status') as response:
async with self.mss_session.get('/nhmlive/status',
timeout=ClientTimeout(total=5)) as response:
status['mss_status'] = {
**(await response.json()),
'response_time': time.monotonic() - start_time,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[tool]
[tool.commitizen]
name = "cz_nhm"
version = "0.16.2"
version = "0.16.3"
tag_format = "v$version"
update_changelog_on_bump = true
changelog_incremental = true
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 = iiif-image-server
version = 0.16.2
version = 0.16.3
description = A IIIF enabled media server primarily used by the NHM Data Portal
long_description = file: README.md
license_files = LICENSE
Expand Down

0 comments on commit 421b85e

Please sign in to comment.