def try_to_restart_deads(self):
        """Try to reinit and restart dead instances

        :return: None
        """
        to_restart = self.to_restart[:]
        del self.to_restart[:]

        for instance in to_restart:
            logger.warning("Trying to restart module: %s", instance.name)

            if self.try_instance_init(instance):
                logger.warning("Restarting %s...", instance.name)
                # Because it is a restart, clean the module inner process reference
                instance.process = None
                # If it's an external module, it will start the process
                instance.start()
                # Ok it's good now :)
            else:
                # Will retry later...
                self.to_restart.append(instance)
def try_to_restart_deads ( self ) : to_restart = self . to_restart [ : ] del self . to_restart [ : ] for instance in to_restart : logger . warning ( "Trying to restart module: %s" , instance . name ) if self . try_instance_init ( instance ) : logger . warning ( "Restarting %s..." , instance . name ) instance . process = None instance . start ( ) else : self . to_restart . append ( instance )
Try to reinit and restart dead instances

        :return: None