

def stop_expr(self, expr_id):
    '\n        :param expr_id: experiment id\n        :return:\n        '
    self.log.debug(('begin to stop %s' % str(expr_id)))
    expr = Experiment.objects(id=expr_id, status=EStatus.RUNNING).first()
    if (expr is not None):
        starter = self.get_starter(expr.hackathon, expr.template)
        if starter:
            starter.stop_expr(Context(experiment_id=expr.id, experiment=expr))
        self.log.debug(('experiment %s ended success' % expr_id))
        return ok('OK')
    else:
        return ok()

dataset/ETHPy150Open msopentechcn/open-hackathon/open-hackathon-server/src/hackathon/expr/expr_mgr.py ExprManager.stop_expr/original