Commit 3ab92007 authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

Parse sitemap only once per media_export to improve performance

parent 6716272c
......@@ -120,6 +120,7 @@ def foxml_export(objectstore_path, output_path, recordsets_csv_file):
def media_export(record_set_path, datastreamstore_path, http_files_path, rtmp_files_path, sitemap_file):
logger = _create_logger("media_export", path.join(record_set_path, "media_export.log"))
sitemap = _parse_sitemap(sitemap_file)
for foxml_path in glob(path.join(record_set_path, "*.xml")):
logger.debug("Exporting media files for file: '" + foxml_path + "'")
......@@ -128,7 +129,7 @@ def media_export(record_set_path, datastreamstore_path, http_files_path, rtmp_fi
original_document_id = foxml_reader.get_original_identifier()
media_file_searcher = MediaFileSearcher(foxml_reader, datastreamstore_path, http_files_path, rtmp_files_path,
_parse_sitemap(sitemap_file))
sitemap)
accesscopy_file = media_file_searcher.search_media_file()
if accesscopy_file is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment