def manage(self):
        """
        Manage the task to handle restarts, reconfiguration, etc.

        Returns True to request a shorter period before the next call,
        False if nothing special is needed.
    """
        log = self._params.get('log', self._discard)
        if self._stopping:
            log.debug("Task '%s', stopping, retrying stop()", self._name)
            return self.stop()
        now = time.time()
        if self._started and self._limit:
            if now > self._limit:
                log.debug("Task '%s', time limit exceeded by %s, stopping", self._name, deltafmt(now - self._limit))
                return self.stop()
            else:
                log.debug("Task '%s', time limit remaining %s", self._name, deltafmt(self._limit - now))
        if self._legion.is_exiting():
            log.debug("Not managing '%s', legion is exiting", self._name)
            return False
        log.debug("managing '%s'", self._name)
        return self._start()
def manage ( self ) : log = self . _params . get ( 'log' , self . _discard ) if self . _stopping : log . debug ( "Task '%s', stopping, retrying stop()" , self . _name ) return self . stop ( ) now = time . time ( ) if self . _started and self . _limit : if now > self . _limit : log . debug ( "Task '%s', time limit exceeded by %s, stopping" , self . _name , deltafmt ( now - self . _limit ) ) return self . stop ( ) else : log . debug ( "Task '%s', time limit remaining %s" , self . _name , deltafmt ( self . _limit - now ) ) if self . _legion . is_exiting ( ) : log . debug ( "Not managing '%s', legion is exiting" , self . _name ) return False log . debug ( "managing '%s'" , self . _name ) return self . _start ( )
Manage the task to handle restarts, reconfiguration, etc.

        Returns True to request a shorter period before the next call,
        False if nothing special is needed.