예제 #1
0
class SynchronizingProcess(Process):
    def __init__(self):
        Process.__init__(self)
        from conductor.lib.bus import SynchronizingBus
        self.bus = SynchronizingBus()
        self.bus.subscribe('log', self.log)
        self.bus.subscribe('main', self.check_children)
        
    def check_children(self):
        if not active_children():
            self.bus.log("No more children still running, let's exit the main process")
            self.bus.unsubscribe('main', self.check_children)
            self.bus.exit()
예제 #2
0
class SynchronizingProcess(Process):
    def __init__(self):
        Process.__init__(self)
        from conductor.lib.bus import SynchronizingBus
        self.bus = SynchronizingBus()
        self.bus.subscribe('log', self.log)
        self.bus.subscribe('main', self.check_children)

    def check_children(self):
        if not active_children():
            self.bus.log(
                "No more children still running, let's exit the main process")
            self.bus.unsubscribe('main', self.check_children)
            self.bus.exit()
예제 #3
0
 def __init__(self):
     Process.__init__(self)
     from conductor.lib.bus import SynchronizingBus
     self.bus = SynchronizingBus()
     self.bus.subscribe('log', self.log)
     self.bus.subscribe('main', self.check_children)
예제 #4
0
 def __init__(self):
     Process.__init__(self)
     from conductor.lib.bus import SynchronizingBus
     self.bus = SynchronizingBus()
     self.bus.subscribe('log', self.log)
     self.bus.subscribe('main', self.check_children)