Fix issue with fit deletion (#1211)
* bump dev * Fix issue with deleted fit not being removed from database cache (#1207). Also, include some error handling around the our commit stuff
This commit is contained in:
@@ -19,8 +19,8 @@ debug = False
|
|||||||
saveInRoot = False
|
saveInRoot = False
|
||||||
|
|
||||||
# Version data
|
# Version data
|
||||||
version = "1.29.3"
|
version = "1.29.4"
|
||||||
tag = "Stable"
|
tag = "git"
|
||||||
expansionName = "YC119.5"
|
expansionName = "YC119.5"
|
||||||
expansionVersion = "1.0"
|
expansionVersion = "1.0"
|
||||||
evemonMinVersion = "4081"
|
evemonMinVersion = "4081"
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# ===============================================================================
|
# ===============================================================================
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
from sqlalchemy.sql import and_
|
from sqlalchemy.sql import and_
|
||||||
from sqlalchemy import desc, select
|
from sqlalchemy import desc, select
|
||||||
|
|
||||||
@@ -539,5 +541,10 @@ def remove(stuff):
|
|||||||
|
|
||||||
def commit():
|
def commit():
|
||||||
with sd_lock:
|
with sd_lock:
|
||||||
saveddata_session.commit()
|
try:
|
||||||
saveddata_session.flush()
|
saveddata_session.commit()
|
||||||
|
saveddata_session.flush()
|
||||||
|
except Exception:
|
||||||
|
saveddata_session.rollback()
|
||||||
|
exc_info = sys.exc_info()
|
||||||
|
raise exc_info[0], exc_info[1], exc_info[2]
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class Fit(object):
|
|||||||
if booster.boosted_fit != fit and booster.boosted_fit in eos.db.saveddata_session: # GH issue #359
|
if booster.boosted_fit != fit and booster.boosted_fit in eos.db.saveddata_session: # GH issue #359
|
||||||
refreshFits.add(booster.boosted_fit)
|
refreshFits.add(booster.boosted_fit)
|
||||||
|
|
||||||
eos.db.saveddata_session.delete(fit)
|
eos.db.remove(fit)
|
||||||
|
|
||||||
pyfalog.debug(" Need to refresh {} fits: {}", len(refreshFits), refreshFits)
|
pyfalog.debug(" Need to refresh {} fits: {}", len(refreshFits), refreshFits)
|
||||||
for fit in refreshFits:
|
for fit in refreshFits:
|
||||||
|
|||||||
Reference in New Issue
Block a user