diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ python3-swh.model (>= 0.0.15), python3-swh.objstorage (>= 0.0.17), python3-swh.scheduler (>= 0.0.14), - python3-swh.storage (>= 0.0.100), + python3-swh.storage (>= 0.0.102), python3-vcversioner Standards-Version: 3.9.6 Homepage: https://forge.softwareheritage.org/source/swh-archiver/ diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -3,4 +3,4 @@ swh.model >= 0.0.15 swh.objstorage >= 0.0.17 swh.scheduler >= 0.0.14 -swh.storage >= 0.0.100 +swh.storage >= 0.0.102 diff --git a/swh/archiver/storage.py b/swh/archiver/storage.py --- a/swh/archiver/storage.py +++ b/swh/archiver/storage.py @@ -36,7 +36,7 @@ def get_db(self): return self._db - @db_transaction_generator + @db_transaction_generator() def archive_ls(self, db=None, cur=None): """ Get all the archives registered on the server. @@ -45,7 +45,7 @@ """ yield from db.archive_ls(cur) - @db_transaction + @db_transaction() def content_archive_get(self, content_id, db=None, cur=None): """ Get the archival status of a content. @@ -60,7 +60,7 @@ """ return db.content_archive_get(content_id, cur) - @db_transaction_generator + @db_transaction_generator() def content_archive_get_copies(self, last_content=None, limit=1000, db=None, cur=None): """ Get the list of copies for `limit` contents starting after @@ -79,7 +79,7 @@ """ yield from db.content_archive_get_copies(last_content, limit, cur) - @db_transaction_generator + @db_transaction_generator() def content_archive_get_unarchived_copies( self, retention_policy, last_content=None, limit=1000, db=None, cur=None): @@ -102,7 +102,7 @@ yield from db.content_archive_get_unarchived_copies( retention_policy, last_content, limit, cur) - @db_transaction_generator + @db_transaction_generator() def content_archive_get_missing(self, content_ids, backend_name, db=None, cur=None): """Retrieve missing sha1s from source_name. @@ -122,7 +122,7 @@ for content_id in db.content_archive_get_missing(backend_name, cur): yield content_id[0] - @db_transaction_generator + @db_transaction_generator() def content_archive_get_unknown(self, content_ids, db=None, cur=None): """Retrieve unknown sha1s from content_archive. @@ -140,7 +140,7 @@ for content_id in db.content_archive_get_unknown(cur): yield content_id[0] - @db_transaction + @db_transaction() def content_archive_update(self, content_id, archive_id, new_status=None, db=None, cur=None): """ Update the status of an archive content and set its mtime to now @@ -158,7 +158,7 @@ """ db.content_archive_update(content_id, archive_id, new_status, cur) - @db_transaction + @db_transaction() def content_archive_add( self, content_ids, sources_present, db=None, cur=None): """Insert a new entry in db about content_id.