Ejemplo n.º 1
0
            def import_task_created_event(self, session, task):
                if isinstance(task, SingletonImportTask) \
                        or isinstance(task, SentinelImportTask)\
                        or isinstance(task, ArchiveImportTask):
                    return task

                new_tasks = []
                for item in task.items:
                    new_tasks.append(SingletonImportTask(task.toppath, item))

                return new_tasks
Ejemplo n.º 2
0
 def emitter(task):
     for item in task.items:
         task = SingletonImportTask(task.toppath, item)
         for new_task in task.handle_created(self):
             yield new_task
     yield SentinelImportTask(task.toppath, task.paths)