1 | # |
||
2 | # Notification object that produces geometry data |
||
3 | # |
||
4 | # |
||
5 | # SOFTWARE HISTORY |
||
6 | # |
||
7 | # Date Ticket# Engineer Description |
||
8 | # ------------ ---------- ----------- -------------------------- |
||
9 | # 07/22/16 2416 tgurney Initial creation |
||
10 | # 09/07/17 6175 tgurney Override messageReceived |
||
11 | # |
||
12 | |||
13 | import traceback |
||
14 | import dynamicserialize |
||
15 | from awips.dataaccess.PyNotification import PyNotification |
||
16 | |||
17 | |||
18 | View Code Duplication | class PyGeometryNotification(PyNotification): |
|
0 ignored issues
–
show
Duplication
introduced
by
![]() |
|||
19 | |||
20 | def messageReceived(self, msg): |
||
21 | dataUriMsg = dynamicserialize.deserialize(msg) |
||
22 | dataUris = dataUriMsg.getDataURIs() |
||
23 | dataTimes = set() |
||
24 | for dataUri in dataUris: |
||
25 | if self.notificationFilter.accept(dataUri): |
||
26 | dataTimes.add(self.getDataTime(dataUri)) |
||
27 | if dataTimes: |
||
28 | try: |
||
29 | data = self.getData(self.request, list(dataTimes)) |
||
30 | self.callback(data) |
||
31 | except ValueError: |
||
32 | traceback.print_exc() |
||
33 | |||
34 | def getData(self, request, dataTimes): |
||
35 | return self.DAL.getGeometryData(request, dataTimes) |
||
36 |