Example #1
0
    def startup(self):
        """ Start a background thread that periodically run()s"""
        super(TaskRegistry, self).startup()
        from Ganga.Core.GangaThread import GangaThread
        self._main_thread = GangaThread(name="GangaTasks",
                                        target=self._thread_main)
        self._main_thread.start()

        # create a registry flusher
        self.flush_thread = RegistryFlusher(self, 'TaskRegistryFlusher')
        self.flush_thread.start()
Example #2
0
 def startup(self):
     self._needs_metadata = True
     super(JobRegistry, self).startup()
     if len(self.metadata.ids()) == 0:
         from Ganga.GPIDev.Lib.JobTree import JobTree
         jt = JobTree()
         stripProxy(jt)._setRegistry(self.metadata)
         self.metadata._add(jt)
     self.jobtree = self.metadata[self.metadata.ids()[-1]]
     self.flush_thread = RegistryFlusher(self)
     self.flush_thread.start()