Merge "Omaha #3244 Improved GFE purge error handling" into omaha_14.4.1
Former-commit-id:97c35aacd2
[formerly a4102501a895730d99e03b6fbafe0e7152b198cd] Former-commit-id:ee21383c07
This commit is contained in:
commit
606920b67d
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