Issue #2824 Fix localVTECpartners include directory. Add logging to help determine when local overrides are not being used

Change-Id: I9a100fe3b1a9c8dc94639029d6380f36f5ba4da7

Former-commit-id: 2bfa521e7d [formerly 6b6aa14e59] [formerly 2bfa521e7d [formerly 6b6aa14e59] [formerly 08a1be844d [formerly 37a420582eea8d3a1b4861e18c20d044c636173f]]]
Former-commit-id: 08a1be844d
Former-commit-id: 0ee3625c50 [formerly 1571b9a8eb]
Former-commit-id: 7897be61e2
This commit is contained in:
Ron Anderson 2014-02-20 09:34:18 -06:00
parent e91fd1d683
commit 30d9fec3ae
5 changed files with 39 additions and 17 deletions

View file

@ -46,17 +46,19 @@ import com.raytheon.uf.common.util.FileUtil;
/**
* Manages the serverConfigs of active sites
*
*
* <pre>
*
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 9, 2009 njensen Initial creation
* Dec 11, 2012 14360 ryu Throw specific exception for missing configuration.
*
* Feb 20, 2014 #2824 randerso Fixed import of localVTECPartners to use siteID
* Added common python path for LogStream
*
* </pre>
*
*
* @author njensen
* @version 1.0
*/
@ -74,7 +76,7 @@ public class IFPServerConfigManager {
/**
* Returns the sites that have active configurations
*
*
* @return
*/
protected static Set<String> getActiveSites() {
@ -83,7 +85,7 @@ public class IFPServerConfigManager {
/**
* Gets the server configuration for a particular site
*
*
* @param siteID
* the site
* @return the site's configuration
@ -102,7 +104,7 @@ public class IFPServerConfigManager {
/**
* Initializes a site's serverConfig by reading in the site's localConfig
*
*
* @param siteID
* the site
* @return the site's configuration
@ -163,12 +165,15 @@ public class IFPServerConfigManager {
}
siteDir = siteDirFile.getPath();
String vtecPath = GfePyIncludeUtil.getVtecIncludePath();
String commonPythonPath = GfePyIncludeUtil.getCommonPythonIncludePath();
String vtecPath = GfePyIncludeUtil.getVtecIncludePath(siteID);
PythonScript py = null;
try {
py = new PythonScript(FileUtil.join(baseDir, "wrapper.py"),
PyUtil.buildJepIncludePath(siteDir, baseDir, vtecPath),
PyUtil.buildJepIncludePath(siteDir, baseDir,
commonPythonPath, vtecPath),
IFPServerConfig.class.getClassLoader());
SimpleServerConfig simpleConfig = (SimpleServerConfig) py.execute(
"getSimpleConfig", null);
@ -188,7 +193,7 @@ public class IFPServerConfigManager {
/**
* Removes a site's configuration from the set of active configurations
*
*
* @param siteID
*/
protected static void removeSite(String siteID) {

View file

@ -20,8 +20,18 @@
# NOTE: THIS FILE SHOULD NOT BE USER_MODIFIED. INSTEAD, REFER TO THE
# DOCUMENTATION ON HOW ENTRIES IN THIS FILE MAY BE OVERRIDDEN. REFER TO
# LOCALMAPS DOCUMENTATION.
#
# Maps.py - map background definitions for ifpServer
#
# ----------------------------------------------------------------------------
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 02/20/2014 #2824 randerso Added log message when no localMaps file is found
#
########################################################################
from ShapeTable import ShapeTable
@ -311,7 +321,8 @@ if not BASELINE:
try:
from localMaps import *
except ImportError:
pass
import LogStream
LogStream.logEvent("No localMaps file found, using baseline settings.");
def getMaps():
from java.util import ArrayList

View file

@ -33,8 +33,9 @@
# 08/09/2013 #1571 randerso Changed projections to use the Java
# ProjectionType enumeration
# 10/03/2013 #2418 dgilling Update for new pSurge 2.0 data.
# 10/03/2013 2424 randerso Change localTC to use dateutil instead of pytz
# 10/03/2013 #2424 randerso Change localTC to use dateutil instead of pytz
# to get correct offsets for Alaska
# 02/20/2014 #2824 randerso Added log message when local override files are not found
#
########################################################################
@ -57,6 +58,8 @@ def siteImport(modName):
if fp:
fp.close()
except ImportError:
import LogStream
LogStream.logEvent("No " + modName + " file found, using baseline settings.");
return 0
globals()[modName] = __import__(modName)
return 1

View file

@ -49,7 +49,8 @@ import com.raytheon.uf.edex.site.ISiteActivationListener;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 28, 2013 dgilling Initial creation
* Feb 28, 2013 dgilling Initial creation
* Feb 20, 2014 #2824 randerso Changed log level of message when activating FetchAT
*
* </pre>
*
@ -80,7 +81,7 @@ public class FetchActiveTableSrv implements ISiteActivationListener {
FetchATJobConfig config = new FetchATJobConfig(configData);
final String site = config.getSiteId();
statusHandler.debug("Activating FetchAT for " + site);
statusHandler.info("Activating FetchAT for " + site);
statusHandler.debug("Site: " + site + " config: " + config);
if ((siteConfigMap.containsKey(site))

View file

@ -26,6 +26,7 @@
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/11/13 #2083 randerso Fixed getISCSites to look in configured
# 02/20/2014 #2824 randerso Added log message when no localVTECPartners file is found
#VTEC_Partners.py - configuration file to control filtering and merging
#of VTEC active table.
@ -298,5 +299,6 @@ except:
#allow overrides
try:
from localVTECPartners import *
except:
pass
except ImportError:
import LogStream
LogStream.logEvent("No localVTECPartners file found, using baseline settings.");