memsql/common/sql_step_queue/task_handler.py
def stop_step(self, step_name):
        """ Stop a step. """
        if self.finished is not None:
            raise AlreadyFinished()

        steps = copy.deepcopy(self.steps)

        step_data = self._get_step(step_name, steps=steps)
        if step_data is None:
            raise StepNotStarted()
        elif 'stop' in step_data:
            raise StepAlreadyFinished()

        step_data['stop'] = datetime.utcnow()

        step_data['duration'] = util.timedelta_total_seconds(step_data['stop'] - step_data['start'])
        self._save(steps=steps)
def stop_step(self, step_name):
        if self.finished is not None:
            raise AlreadyFinished()

        steps = copy.deepcopy(self.steps)

        step_data = self._get_step(step_name, steps=steps)
        if step_data is None:
            raise StepNotStarted()
        elif 'stop' in step_data:
            raise StepAlreadyFinished()

        step_data['stop'] = datetime.utcnow()

        step_data['duration'] = util.timedelta_total_seconds(step_data['stop'] - step_data['start'])
        self._save(steps=steps)
def stop_step ( self , step_name ) : if self . finished is not None : raise AlreadyFinished ( ) steps = copy . deepcopy ( self . steps ) step_data = self . _get_step ( step_name , steps = steps ) if step_data is None : raise StepNotStarted ( ) elif 'stop' in step_data : raise StepAlreadyFinished ( ) step_data [ 'stop' ] = datetime . utcnow ( ) step_data [ 'duration' ] = util . timedelta_total_seconds ( step_data [ 'stop' ] - step_data [ 'start' ] ) self . _save ( steps = steps )
Stop a step.
Stop a step .