Changeset View
Changeset View
Standalone View
Standalone View
swh/archiver/db.py
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | def mktemp_content_archive(self, cur=None): | ||||
""" | """ | ||||
pass | pass | ||||
@stored_procedure('swh_content_archive_add') | @stored_procedure('swh_content_archive_add') | ||||
def content_archive_add_from_temp(self, cur=None): | def content_archive_add_from_temp(self, cur=None): | ||||
"""Add new content archive entries from temporary table. | """Add new content archive entries from temporary table. | ||||
Use from archiver.storage module:: | Use from archiver.storage module:: | ||||
db.mktemp_content_archive(cur) | |||||
self.db.mktemp_content_archive() | |||||
# copy data over to the temp table | # copy data over to the temp table | ||||
self.db.copy_to([{'colname': id0}, {'colname': id1}], | db.copy_to([{'colname': id0}, {'colname': id1}], | ||||
'tmp_cache_content', | 'tmp_cache_content', | ||||
['colname'], cur) | ['colname'], cur) | ||||
# insert into the main table | # insert into the main table | ||||
self.db.add_content_archive_from_temp(cur) | db.add_content_archive_from_temp(cur) | ||||
""" | """ | ||||
pass | pass | ||||
def content_archive_get_missing(self, backend_name, cur=None): | def content_archive_get_missing(self, backend_name, cur=None): | ||||
"""Retrieve the content missing from backend_name. | """Retrieve the content missing from backend_name. | ||||
""" | """ | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |