@logged("info")
    @Override(Experiment.Experiment)
    def do_start_experiment(self, *args, **kwargs):
        """
        Callback run when the experiment is started. After the starting
        thread finishes successfully, it will set is_ready to True.
        """
        # Using temporal variable "um" so if somebody does self.user_manager = None 
        # between the "if self.user_manager is not None" and the action there is no error
        um = self.user_manager
        if um is not None:
            um.cancel()

        initial = time.time()
        while self.is_ready and (initial + TIME_WAITING_START) > time.time():
            if DEBUG:
                print "is_ready:",self.is_ready
            time.sleep(0.1)

        if self.is_ready:
            return "Already started and ready"

        if self.is_error:
            return "Can't start. Error state: ", str(self.error)

        if self._start_t != None and self._start_t.isAlive():
            return "Already starting"

        self.session_id = self.generate_session_id()
        self._start_t = self.handle_start_exp_t()
        return "Starting"
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/experiments/vm/server.py/VMExperiment.do_start_experiment/original