Commit aa8a86c6 authored by Paul Graydon's avatar Paul Graydon

wendelin_telecom_base: Improve KPI calculation robustness

Improve error handling and reduce chunk size
parent c53925b1
...@@ -13,6 +13,9 @@ def load_measurements(alogm): ...@@ -13,6 +13,9 @@ def load_measurements(alogm):
# Invalid measurement: simply skip it # Invalid measurement: simply skip it
pass pass
measurement = alogm.read() measurement = alogm.read()
except amari_kpi.LogError:
# Invalid measurement: simply skip it
pass
finally: finally:
alogm.close() alogm.close()
return mlog return mlog
......
...@@ -8,7 +8,7 @@ total_size = in_data_stream.getSize() ...@@ -8,7 +8,7 @@ total_size = in_data_stream.getSize()
if start >= total_size: if start >= total_size:
return return
chunk_size = 1024 * 1024 chunk_size = 512 * 512
end = min(start + chunk_size, total_size) end = min(start + chunk_size, total_size)
log_data = ''.join(in_data_stream.readChunkList(start, end)) log_data = ''.join(in_data_stream.readChunkList(start, end))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment