Skip to content
Snippets Groups Projects
Commit 86fceec9 authored by Luca Scarabello's avatar Luca Scarabello
Browse files

bug fix mpi: cannot load chunks or templates

parent 568fbf80
No related branches found
No related tags found
No related merge requests found
......@@ -57,10 +57,12 @@ class ScannedDaysManager(object):
def next_to_process(self, chunk_filter = None, template_filter = None):
chunk_to_process = self.__filter(self.to_process, chunk_filter, template_filter)
for chunk in sorted(chunk_to_process):
template = next(iter( self.to_process[chunk] ))
self.__remove_entry(self.to_process, chunk, template)
self.__add_entry(self.processing, chunk, template)
return (chunk, template)
valid_templates = self.to_process[chunk] & set(template_filter)
if valid_templates:
template = next(iter(valid_templates))
self.__remove_entry(self.to_process, chunk, template)
self.__add_entry(self.processing, chunk, template)
return (chunk, template)
return (None, None)
def set_processed(self, chunk, template, force=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment