Commit f6756044 authored by Raphaël Hertzog's avatar Raphaël Hertzog

extract_source_files: extend the run lock regularly

Because this task can take a very long time. Also save the list of
already processed entries when the lock gets extended.

Fixes: #33
parent 50b2c93c
......@@ -91,6 +91,11 @@ class ExtractSourcePackageFiles(BaseTask, ProcessSourcePackage):
# Process pending items
for srcpkg in self.items_to_process():
# Save what has been processed when it takes long enough that we
# had to extend the lock
if self.extend_lock():
self.save_data()
extracted_files = [
extracted_file.name
for extracted_file in srcpkg.extracted_source_files.all()
......
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