Skip to content

Commit b141505

Browse files
committed
bigger min timeout
1 parent edd8df2 commit b141505

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

datamint/api/endpoints/resources_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ async def _upload_single_resource_async(self,
395395
except Exception as e:
396396
_LOGGER.warning(f"Failed to add metadata to form: {e}")
397397

398-
# Scale total/read timeout proportionally for large files (min 300 s, ≥2 s/MB)
399-
_upload_secs = max(300, file_size // (512 * 1024)) if file_size else 300
398+
# Scale total/read timeout proportionally for large files (min 1800 s, ≥2 s/MB)
399+
_upload_secs = max(1800, file_size // (512 * 1024)) if file_size else 1800
400400
timeout = aiohttp.ClientTimeout(total=_upload_secs, connect=60, sock_read=_upload_secs)
401401
resp_data = await self._make_request_async_json('POST',
402402
endpoint=self.endpoint_base,

0 commit comments

Comments
 (0)