Example #1
0
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])
Example #2
0
File: fit.py Project: pyfa-org/Pyfa
 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)
Example #3
0
def commit():
    with sd_lock:
        saveddata_session.commit()
        saveddata_session.flush()
Example #4
0
 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)
Example #5
0
def commit():
    with sd_lock:
        saveddata_session.commit()
        saveddata_session.flush()