OB_14.1.1-21 baseline
Former-commit-id:29681c7ca4
[formerly d220320ed3c6e9a0fe9fe26d83dd71eec6eafa0b] Former-commit-id:1d92e5bab6
This commit is contained in:
parent
b2401d2f0d
commit
271ec85c0c
6 changed files with 458 additions and 383 deletions
|
@ -29,6 +29,15 @@
|
|||
# This procedure reads all of the temporary hazard grids and selectively
|
||||
# loads them in the the "Hazards" grid.
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# Dec 23, 2013 16893 ryu Check in njensen's change to removeTempHazards()
|
||||
# to call SmartScript.unloadWEs().
|
||||
#
|
||||
########################################################################
|
||||
|
||||
# The MenuItems list defines the GFE menu item(s) under which the
|
||||
# Procedure is to appear.
|
||||
|
@ -227,9 +236,11 @@ class Procedure(SmartScript.SmartScript):
|
|||
def removeTempHazards(self):
|
||||
parms = self.loadedParms()
|
||||
|
||||
toRemovePairs = []
|
||||
for weName, level, dbID in parms:
|
||||
if string.find(weName, "haz") == 0:
|
||||
self.unloadWE(MODEL, weName, level)
|
||||
toRemovePairs.append((weName, level))
|
||||
self.unloadWEs(MODEL, toRemovePairs)
|
||||
|
||||
return
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
# Jun 21, 2013 14983 ryu Fixed encodeEditArea() to evaluate query
|
||||
# when necessary
|
||||
# Oct 07, 2013 2424 randerso remove use of pytz
|
||||
# Dec 23, 2013 16893 ryu Added unloadWEs() method (created by njensen)
|
||||
#
|
||||
########################################################################
|
||||
import types, string, time, sys
|
||||
|
@ -1788,6 +1789,19 @@ class SmartScript(BaseTool.BaseTool):
|
|||
parmJA[0] = parm
|
||||
self.__parmMgr.deleteParm(parmJA)
|
||||
|
||||
def unloadWEs(self, model, elementLevelPairs, mostRecent=0):
|
||||
jparms = []
|
||||
for element, level in elementLevelPairs:
|
||||
exprName = self.getExprName(model, element, level, mostRecent)
|
||||
parm = self.__parmMgr.getParmInExpr(exprName, 1)
|
||||
if parm:
|
||||
jparms.append(parm)
|
||||
if jparms:
|
||||
parmJA = jep.jarray(len(jparms), jparms[0])
|
||||
for i in xrange(len(jparms)):
|
||||
parmJA[i] = jparms[i]
|
||||
self.__parmMgr.deleteParm(parmJA)
|
||||
|
||||
def saveElements(self, elementList):
|
||||
# Save the given Fcst elements to the server
|
||||
# Example:
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
<exclude>.*datadelivery.*</exclude>
|
||||
<exclude>.*bandwidth.*</exclude>
|
||||
<includeMode>excludeDpaAndOgc</includeMode>
|
||||
<exclude>obs-ingest-metarshef.xml</exclude>
|
||||
<!-- ncep excludes until tested -->
|
||||
<exclude>aww-ingest.xml</exclude>
|
||||
<exclude>ncairep-ingest.xml</exclude>
|
||||
|
@ -121,6 +122,7 @@
|
|||
<include>persist-ingest.xml</include>
|
||||
<include>obs-common.xml</include>
|
||||
<include>obs-ingest.xml</include>
|
||||
<include>obs-ingest-metarshef.xml</include>
|
||||
<include>metartohmdb-plugin.xml</include>
|
||||
<include>pointdata-common.xml</include>
|
||||
<include>shef-common.xml</include>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<beans
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||
|
||||
<bean id="obsCamelRegistered" factory-bean="contextManager" factory-method="register"
|
||||
depends-on="persistCamelRegistered,
|
||||
shefCamelRegistered,
|
||||
metarToHMDBCamelRegistered">
|
||||
<constructor-arg ref="obs-camel" />
|
||||
</bean>
|
||||
|
||||
<camelContext id="obs-camel" xmlns="http://camel.apache.org/schema/spring"
|
||||
errorHandlerRef="errorHandler" autoStartup="false">
|
||||
|
||||
<!-- Begin METAR routes -->
|
||||
<route id="metarIngestRoute">
|
||||
<from uri="jms-durable:queue:Ingest.obs" />
|
||||
<setHeader headerName="pluginName">
|
||||
<constant>obs</constant>
|
||||
</setHeader>
|
||||
<doTry>
|
||||
<pipeline>
|
||||
<bean ref="stringToFile" />
|
||||
<bean ref="obsDecoder" method="decode" />
|
||||
<bean ref="dupElim" />
|
||||
<bean ref="metarPointData" method="toPointData" />
|
||||
<multicast>
|
||||
<to uri="direct-vm:persistIndexAlert" />
|
||||
<to uri="direct-vm:metarToShef" />
|
||||
<to uri="direct-vm:metarToHMDB" />
|
||||
</multicast>
|
||||
</pipeline>
|
||||
<doCatch>
|
||||
<exception>java.lang.Throwable</exception>
|
||||
<to uri="log:metar?level=ERROR" />
|
||||
</doCatch>
|
||||
</doTry>
|
||||
</route>
|
||||
</camelContext>
|
||||
</beans>
|
|
@ -0,0 +1,41 @@
|
|||
<beans
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||
|
||||
<!-- This spring configuration is currently only used by the ingestHydro EDEX instance. -->
|
||||
|
||||
<bean id="obsCamelRegistered" factory-bean="contextManager" factory-method="register"
|
||||
depends-on="shefCamelRegistered,
|
||||
metarToHMDBCamelRegistered">
|
||||
<constructor-arg ref="obs-camel" />
|
||||
</bean>
|
||||
|
||||
<camelContext id="obs-camel" xmlns="http://camel.apache.org/schema/spring"
|
||||
errorHandlerRef="errorHandler" autoStartup="false">
|
||||
|
||||
<!-- Begin METAR routes -->
|
||||
<route id="metarIngestRoute">
|
||||
<from uri="jms-durable:queue:Ingest.obs" />
|
||||
<setHeader headerName="pluginName">
|
||||
<constant>obs</constant>
|
||||
</setHeader>
|
||||
<doTry>
|
||||
<pipeline>
|
||||
<bean ref="stringToFile" />
|
||||
<bean ref="obsDecoder" method="decode" />
|
||||
<bean ref="metarPointData" method="toPointData" />
|
||||
<multicast>
|
||||
<to uri="direct-vm:metarToShef" />
|
||||
<to uri="direct-vm:metarToHMDB" />
|
||||
</multicast>
|
||||
</pipeline>
|
||||
<doCatch>
|
||||
<exception>java.lang.Throwable</exception>
|
||||
<to uri="log:metar?level=ERROR" />
|
||||
</doCatch>
|
||||
</doTry>
|
||||
</route>
|
||||
</camelContext>
|
||||
</beans>
|
|
@ -15,39 +15,4 @@
|
|||
<constructor-arg value="jms-durable:queue:Ingest.obs" />
|
||||
</bean>
|
||||
|
||||
<bean id="obsCamelRegistered" factory-bean="contextManager" factory-method="register"
|
||||
depends-on="persistCamelRegistered,
|
||||
shefCamelRegistered,
|
||||
metarToHMDBCamelRegistered">
|
||||
<constructor-arg ref="obs-camel" />
|
||||
</bean>
|
||||
|
||||
<camelContext id="obs-camel" xmlns="http://camel.apache.org/schema/spring"
|
||||
errorHandlerRef="errorHandler" autoStartup="false">
|
||||
|
||||
<!-- Begin METAR routes -->
|
||||
<route id="metarIngestRoute">
|
||||
<from uri="jms-durable:queue:Ingest.obs" />
|
||||
<setHeader headerName="pluginName">
|
||||
<constant>obs</constant>
|
||||
</setHeader>
|
||||
<doTry>
|
||||
<pipeline>
|
||||
<bean ref="stringToFile" />
|
||||
<bean ref="obsDecoder" method="decode" />
|
||||
<bean ref="dupElim" />
|
||||
<bean ref="metarPointData" method="toPointData" />
|
||||
<multicast>
|
||||
<to uri="direct-vm:persistIndexAlert" />
|
||||
<to uri="direct-vm:metarToShef" />
|
||||
<to uri="direct-vm:metarToHMDB" />
|
||||
</multicast>
|
||||
</pipeline>
|
||||
<doCatch>
|
||||
<exception>java.lang.Throwable</exception>
|
||||
<to uri="log:metar?level=ERROR" />
|
||||
</doCatch>
|
||||
</doTry>
|
||||
</route>
|
||||
</camelContext>
|
||||
</beans>
|
Loading…
Add table
Reference in a new issue