def flush(): with sd_lock: try: saveddata_session.flush() except Exception: saveddata_session.rollback() exc_info = sys.exc_info() raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
def init(self): if self.source_fit.isInvalid: # Very rare for this to happen, but be prepared for it saveddata_session.delete(self.source_fit) saveddata_session.flush() saveddata_session.refresh(self.victim_fit)
def commit(): with sd_lock: saveddata_session.commit() saveddata_session.flush()
def init(self): if self.booster_fit.isInvalid: # Very rare for this to happen, but be prepared for it saveddata_session.delete(self.booster_fit) saveddata_session.flush() saveddata_session.refresh(self.boosted_fit)