Merge "Issue #2824 Fix localVTECpartners include directory. Add logging to help determine when local overrides are not being used" into development
Former-commit-id:c13942140a
[formerlyc13942140a
[formerly 0729266c3f82eccdbf6835789898291ad34451c4]] Former-commit-id:6f4a63000d
Former-commit-id:c07544b904
This commit is contained in:
commit
32b8cc8a8e
5 changed files with 39 additions and 17 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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.");
|
||||
|
|
Loading…
Add table
Reference in a new issue