Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9347523
D405.id4548.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
837 B
Subscribers
None
D405.id4548.diff
View Options
diff --git a/swh/vault/cookers/base.py b/swh/vault/cookers/base.py
--- a/swh/vault/cookers/base.py
+++ b/swh/vault/cookers/base.py
@@ -6,6 +6,7 @@
import abc
import io
import logging
+from psycopg2.extensions import QueryCanceledError
from swh.model import hashutil
@@ -111,7 +112,11 @@
self.fileobj = BytesIOBundleSizeLimit(size_limit=self.max_bundle_size)
try:
- self.prepare_bundle()
+ try:
+ self.prepare_bundle()
+ except QueryCanceledError:
+ raise PolicyError(
+ "Timeout reached while assembling the requested bundle")
bundle = self.fileobj.getvalue()
# TODO: use proper content streaming instead of put_bundle()
self.backend.put_bundle(self.CACHE_TYPE_KEY, self.obj_id, bundle)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 5:39 PM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221721
Attached To
D405: cookers: readable message for SQL timeouts
Event Timeline
Log In to Comment