Merge "Issue #1735 Performance improvments for LLWSData." into development
Former-commit-id: 5ee7c58ea1f95b89bf252edbee02d0560eaa98aa
This commit is contained in:
commit
b44db0bc2c
5 changed files with 53 additions and 22 deletions
|
@ -538,8 +538,14 @@ def _retrieveMapData(siteIDs, timeSeconds, parameters=Parameters):
|
|||
for p in parameters:
|
||||
task.addParameter(p)
|
||||
pdcs = GuidanceUtil.getGFEPointsData(task)
|
||||
i = 0
|
||||
results = {}
|
||||
if pdcs is None :
|
||||
for siteId in siteIDs:
|
||||
_Logger.info('Data not available for %s', siteID)
|
||||
results[siteID] = None
|
||||
return results
|
||||
|
||||
i = 0
|
||||
for siteID in siteIDs:
|
||||
pdc = pdcs.getContainer(i)
|
||||
if i < pdcs.getSize() :
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
#* Date Ticket# Engineer Description
|
||||
#* ------------ ---------- ----------- --------------------------
|
||||
#* Initial creation.
|
||||
#* Mar 07, 2013 1735 rferrel Use SiteGridManger to limit calls to server.
|
||||
#* Mar 07, 2013 1735 rferrel Use SiteGridManager to limit calls to server.
|
||||
##
|
||||
|
||||
import logging, time, cPickle
|
||||
|
|
|
@ -48,6 +48,16 @@
|
|||
# Title: AvnFPS: Incorrect file permission on ISH files
|
||||
#
|
||||
#
|
||||
#**
|
||||
#*
|
||||
#*
|
||||
#* <pre>
|
||||
#* SOFTWARE HISTORY
|
||||
#* Date Ticket# Engineer Description
|
||||
#* ------------ ---------- ----------- --------------------------
|
||||
#* Initial creation.
|
||||
#* Mar 25, 2013 1735 rferrel Retrieve only the last 24 hours of acars records.
|
||||
##
|
||||
|
||||
from com.raytheon.viz.aviation.monitor import LlwsManager
|
||||
import logging, os, time
|
||||
|
@ -101,7 +111,12 @@ def retrieve(siteID, info):
|
|||
except LLWSThread.InValid:
|
||||
pass
|
||||
|
||||
acarsRec = LlwsManager.getAcarsRecord(siteID, 0)
|
||||
# This gets all acarsRec in the database since 0 retrieves from the epoch.
|
||||
# This may be ok if database is purged frequently.
|
||||
# How far back should it go 1, 6, 12, 24 hours?
|
||||
# acarsRec = LlwsManager.getAcarsRecord(siteID, 0)
|
||||
refTime = long((time.time() - (24.0*3600.0)) * 1000.0)
|
||||
acarsRec = LlwsManager.getAcarsRecord(siteID, refTime)
|
||||
if acarsRec:
|
||||
acarsId = siteID[1:]
|
||||
th.processAcarsData(acarsId,acarsRec)
|
||||
|
|
|
@ -159,6 +159,17 @@
|
|||
# Status: CLOSED
|
||||
# Title: AvnFPS: AvnFPS regression based lightning forecast to use LAMP
|
||||
#
|
||||
#**
|
||||
#*
|
||||
#*
|
||||
#* <pre>
|
||||
#* SOFTWARE HISTORY
|
||||
#* Date Ticket# Engineer Description
|
||||
#* ------------ ---------- ----------- --------------------------
|
||||
#* Initial creation.
|
||||
#* Mar 25, 2013 1735 rferrel __initializeLLWSDictsLists now reads cfg data only for
|
||||
#* desired site instead of all sites. So it is O(n) instead of O(n**2)
|
||||
##
|
||||
#
|
||||
import logging, os, Queue, re, time, math, sys
|
||||
import Avn, AvnParser, LLWSData, MetarData
|
||||
|
@ -184,7 +195,6 @@ class Server(object):
|
|||
__TimeOut = 10.0
|
||||
|
||||
def __init__(self, info):
|
||||
#self.name = info['name']
|
||||
self.profilerList = []
|
||||
self.radarList = []
|
||||
self.metarList = []
|
||||
|
@ -207,7 +217,8 @@ class Server(object):
|
|||
rList = []
|
||||
aList = []
|
||||
|
||||
for m in AvnParser.getTafHeaders():
|
||||
m = info['ident']
|
||||
if m is not None:
|
||||
siteDict = AvnParser.getTafSiteCfg(m)
|
||||
try:
|
||||
radars = siteDict['sites']['radars']
|
||||
|
@ -226,8 +237,7 @@ class Server(object):
|
|||
except KeyError:
|
||||
acars = []
|
||||
|
||||
if profilers == [] and radars == [] and acars == []:
|
||||
continue
|
||||
if len(profilers) > 0 or len(radars) > 0 or len(acars) > 0 :
|
||||
#
|
||||
# This TAF site needs to be monitored
|
||||
self.metarList.append(m)
|
||||
|
|
|
@ -101,7 +101,7 @@ import com.raytheon.viz.avnconfig.IStatusSettable;
|
|||
*/
|
||||
public class TafSiteComp {
|
||||
/**
|
||||
*
|
||||
* Grid monitor class name.
|
||||
*/
|
||||
public static final String GRID_MONITOR_CLASS = "GridMonitor";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue