示例#1
0
            def callback(cutout):
                grid.add_cutout(cutout, frame_index, time_index)

                if grid.is_filled():
                    self._cutout_grids[grid.source] = grid
                    events.send(events.IMG_LOADED, grid.source)
                    logger.info("Triplet grid finished downloading.")
示例#2
0
文件: validation.py 项目: drusk/MOP
    def next_workunit(self):
        if self.work_units.is_on_last_item():
            try:
                self._get_new_workunit()
            except NoAvailableWorkException:
                events.send(events.NO_AVAILABLE_WORK)
                return

        self.work_units.next()
示例#3
0
    def next_workunit(self):
        if self.work_units.is_on_last_item():
            try:
                self._get_new_workunit()
            except NoAvailableWorkException:
                events.send(events.NO_AVAILABLE_WORK)
                return

        self.work_units.next()
示例#4
0
    def build_workunit(self, input_fullpath):
        try:
            parsed_data = self.parser.parse(input_fullpath)
        except AssertionError as e:
            logger.critical(str(e))
            events.send(events.NO_AVAILABLE_WORK)
        logger.debug("Parsed %s (%d sources)" %
                     (input_fullpath, parsed_data.get_source_count()))

        _, input_filename = os.path.split(input_fullpath)

        return self._do_build_workunit(input_filename, parsed_data,
                                       self.progress_manager,
                                       self.output_context, self.dry_run)
示例#5
0
文件: validation.py 项目: R136a1-/MOP
 def next_workunit(self):
     if self.work_units.is_on_last_item():
         try:
             self._get_new_workunit()
         except NoAvailableWorkException:
             events.send(events.NO_AVAILABLE_WORK)
             return
     # pre-load some work units if we are within 4 units of the end
     if self.work_units.index >  len(self.work_units) - 3:
         try:
             self.workunit_provider.trigger_prefetching()
         except:
             pass
     self.work_units.next()
示例#6
0
 def next_workunit(self):
     if self.work_units.is_on_last_item():
         try:
             self._get_new_workunit()
         except NoAvailableWorkException:
             events.send(events.NO_AVAILABLE_WORK)
             return
     # pre-load some work units if we are within 4 units of the end
     if self.work_units.index > len(self.work_units) - 3:
         try:
             self.workunit_provider.trigger_prefetching()
         except:
             pass
     self.work_units.next()
示例#7
0
文件: workload.py 项目: R136a1-/MOP
    def build_workunit(self, input_fullpath):
        try:
            parsed_data = self.parser.parse(input_fullpath)
        except AssertionError as e:
            logger.critical(str(e))
            events.send(events.NO_AVAILABLE_WORK)
        logger.debug("Parsed %s (%d sources)" %
                     (input_fullpath, parsed_data.get_source_count()))

        _, input_filename = os.path.split(input_fullpath)

        return self._do_build_workunit(
            input_filename,
            parsed_data,
            self.progress_manager,
            self.output_context,
            self.dry_run)
示例#8
0
    def _on_finished_workunit(self, results_file_paths):
        events.send(events.FINISHED_WORKUNIT, results_file_paths)

        if self.synchronization_manager:
            for path in results_file_paths:
                self.synchronization_manager.add_syncable_file(path)
示例#9
0
 def next_item(self):
     if self.get_current_workunit().is_finished():
         self.next_workunit()
     else:
         self.get_current_workunit().next_item()
         events.send(events.CHANGE_IMAGE)
示例#10
0
 def next_obs(self):
     self.get_current_workunit().next_obs()
     events.send(events.CHANGE_IMAGE)
示例#11
0
文件: models.py 项目: sevenlin123/MOP
 def previous_obs(self):
     self.get_current_workunit().previous_obs()
     events.send(events.CHANGE_IMAGE)
示例#12
0
文件: models.py 项目: sevenlin123/MOP
 def next_obs(self):
     self.get_current_workunit().next_obs()
     events.send(events.CHANGE_IMAGE)
示例#13
0
文件: models.py 项目: sevenlin123/MOP
 def _on_finished_workunit(self, filename):
     events.send(events.FINISHED_WORKUNIT, filename)
示例#14
0
文件: models.py 项目: sevenlin123/MOP
 def _on_image_loaded(self, reading, image):
     self._images_by_reading[reading] = image
     events.send(events.IMG_LOADED, reading)
示例#15
0
 def expect_image_transition(self):
     events.send(events.CHANGE_IMAGE)
示例#16
0
 def _on_image_loaded(self, reading, image):
     self._images_by_reading[reading] = image
     events.send(events.IMG_LOADED, reading)
示例#17
0
 def _on_finished_workunit(self, filename):
     events.send(events.FINISHED_WORKUNIT, filename)
示例#18
0
文件: models.py 项目: sevenlin123/MOP
 def next_item(self):
     if self.get_current_workunit().is_finished():
         self.next_workunit()
     else:
         self.get_current_workunit().next_item()
         events.send(events.CHANGE_IMAGE)
示例#19
0
 def previous_obs(self):
     self.get_current_workunit().previous_obs()
     events.send(events.CHANGE_IMAGE)
示例#20
0
文件: models.py 项目: sevenlin123/MOP
 def previous_item(self):
     self.get_current_workunit().previous_vettable_item()
     events.send(events.CHANGE_IMAGE)
示例#21
0
 def previous_item(self):
     self.get_current_workunit().previous_vettable_item()
     events.send(events.CHANGE_IMAGE)
示例#22
0
 def on_singlet_image_loaded(self, cutout):
     reading = cutout.reading
     self._cutouts[reading] = cutout
     events.send(events.IMG_LOADED, reading)
示例#23
0
文件: validation.py 项目: drusk/MOP
    def _on_finished_workunit(self, results_file_paths):
        events.send(events.FINISHED_WORKUNIT, results_file_paths)

        if self.synchronization_manager:
            for path in results_file_paths:
                self.synchronization_manager.add_syncable_file(path)
示例#24
0
 def pub_next_source():
     events.send(events.CHANGE_IMAGE, data=1)
示例#25
0
文件: validation.py 项目: drusk/MOP
 def expect_image_transition(self):
     events.send(events.CHANGE_IMAGE)
示例#26
0
 def pub_next_source():
     events.send(events.CHANGE_IMAGE, data=1)