def upsertParameter(self, session: Session, parameter: Parameter) \ -> None: try: return ParameterManager().upsertParameter(session, parameter) except TortugaException: raise except Exception as ex: self._logger.exception('Error upserting parameter [%s]' % (parameter.getName())) raise TortugaException(exception=ex)
def upsertParameter(self, session: Session, parameter: Parameter) -> None: try: self._globalParametersDbHandler.upsertParameter( session, parameter.getName(), parameter.getValue(), description=parameter.getDescription()) session.commit() except TortugaException: session.rollback() raise except Exception: session.rollback() self._logger.exception('upsertParameter failed') raise