def persist_host(host): session = SESSION_MAKER() try: session.add(host) session.commit() except Exception: LOGGER.error('Not expected error in host insertion.') raise finally: session.close()
def persist_host(host): session = SESSION_MAKER() try: session.add(host) session.commit() except Exception: LOGGER.error("Not expected error in host insertion.") raise finally: session.close()
def persist_features(rapideye_features): ''' Expects a RapideyeFeatures object and commits it to the database. ''' session = SESSION_MAKER() try: session.add(rapideye_features) session.commit() except Exception: LOGGER.error('Not expected error in host insertion.') raise finally: session.close()
def persist_quality(quality): ''' Gets a Command object, and inserts it into the database. ''' session = SESSION_MAKER() try: session.add(quality) session.commit() except Exception: LOGGER.error('Not expected error in host insertion.') raise finally: session.close()
def persist_command(command): """ Gets a Command object, and inserts it into the database. """ session = SESSION_MAKER() try: session.add(command) session.commit() except Exception: LOGGER.error("Not expected error in host insertion.") raise finally: session.close()
def persist_features(rapideye_features): """ Expects a RapideyeFeatures object and commits it to the database. """ session = SESSION_MAKER() try: session.add(rapideye_features) session.commit() except Exception: LOGGER.error("Not expected error in host insertion.") raise finally: session.close()