Omaha #3244 Improved GFE purge error handling
Change-Id: I18fcf443b6c77a323df76659a8a60cb10b65669c Former-commit-id: d8955e6dcd8f16b33c54de104596e9743ce7d85e
This commit is contained in:
parent
bb6a28c4c0
commit
9ac1f19455
2 changed files with 28 additions and 8 deletions
|
@ -53,6 +53,7 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord;
|
|||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmStorageInfo;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.notify.GridUpdateNotification;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.notify.LockNotification;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.util.GfeUtil;
|
||||
|
@ -103,6 +104,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
|||
* 08/05/13 #1571 randerso Added support for storing GridLocation and ParmStorageInfo in database
|
||||
* 09/30/2013 #2147 rferrel Changes to archive hdf5 files.
|
||||
* 10/15/2013 #2446 randerso Added ORDER BY clause to getOverlappingTimes
|
||||
* 06/12/14 #3244 randerso Improved error handling
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -482,8 +484,21 @@ public class GFEDao extends DefaultPluginDao {
|
|||
|
||||
try {
|
||||
GridParmManager gridParmMgr = ifpServer.getGridParmMgr();
|
||||
gridParmMgr.versionPurge();
|
||||
gridParmMgr.gridsPurge(gridNotifcations, lockNotifications);
|
||||
|
||||
PurgeLogger.logInfo("Purging expired database versions...",
|
||||
"gfe");
|
||||
ServerResponse<?> sr = gridParmMgr.versionPurge();
|
||||
if (!sr.isOkay()) {
|
||||
PurgeLogger.logError(sr.message(), "gfe");
|
||||
}
|
||||
|
||||
PurgeLogger.logInfo("Purging expired grids...", "gfe");
|
||||
sr = gridParmMgr
|
||||
.gridsPurge(gridNotifcations, lockNotifications);
|
||||
if (!sr.isOkay()) {
|
||||
PurgeLogger.logError(sr.message(), "gfe");
|
||||
}
|
||||
|
||||
PurgeLogger.logInfo(
|
||||
"Purging Expired pending isc send requests...", "gfe");
|
||||
int requestsPurged = new IscSendRecordDao()
|
||||
|
|
|
@ -121,6 +121,7 @@ import com.raytheon.uf.edex.database.purge.PurgeLogger;
|
|||
* data that is eligible to be purged.
|
||||
* 05/22/14 #3071 randerso Expand publish time to time constraint quantum after truncating it
|
||||
* to the purge time
|
||||
* 06/12/14 #3244 randerso Improved error handling
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -966,13 +967,15 @@ public class GridParmManager {
|
|||
*/
|
||||
public ServerResponse<?> versionPurge() {
|
||||
|
||||
ServerResponse<List<DatabaseID>> sr = new ServerResponse<List<DatabaseID>>();
|
||||
sr = getDbInventory();
|
||||
if (!sr.isOkay()) {
|
||||
sr.addMessage("VersionPurge failed - couldn't get inventory");
|
||||
ServerResponse<?> sr = new ServerResponse<Object>();
|
||||
|
||||
ServerResponse<List<DatabaseID>> ssr = getDbInventory();
|
||||
if (!ssr.isOkay()) {
|
||||
sr.addMessage("VersionPurge failed - couldn't get database inventory");
|
||||
sr.addMessages(ssr);
|
||||
return sr;
|
||||
}
|
||||
List<DatabaseID> currentInv = sr.getPayload();
|
||||
List<DatabaseID> currentInv = ssr.getPayload();
|
||||
|
||||
// sort the inventory by site, type, model, time (most recent first)
|
||||
Collections.sort(currentInv);
|
||||
|
@ -1083,7 +1086,9 @@ public class GridParmManager {
|
|||
ServerResponse<Integer> sr1 = gp.timePurge(purgeTime,
|
||||
gridNotify, lockNotify);
|
||||
sr.addMessages(sr1);
|
||||
purgedCount += sr1.getPayload();
|
||||
if (sr1.isOkay()) {
|
||||
purgedCount += sr1.getPayload();
|
||||
}
|
||||
|
||||
gridNotifications.addAll(gridNotify);
|
||||
lockNotifications.addAll(lockNotify);
|
||||
|
|
Loading…
Add table
Reference in a new issue