Skip to content
Snippets Groups Projects
Commit 6e994366 authored by Jameson Rollins's avatar Jameson Rollins
Browse files

discovery: don't use /dev/shm data source

The low-latency /dev/shm frames don't have all the data, and we're not
checking that the plugins are only using data available in the low-latency
frames, so don't ok analysis based on the presence of those frames, and
instead wait for the full frames on disk.  This should help prevent some
data missing errors.
parent 92774c01
No related branches found
No related tags found
No related merge requests found
......@@ -35,27 +35,27 @@ def discover_data(event):
query_segs = SegmentList([query_segment])
logging.info("querying for data in range: {} - {}".format(*query_segment))
### first check if low-latency frames are available
logging.info("checking if data is available in /dev/shm...")
try:
shm_segs = find_shm_segments()
except ImportError as e:
logging.info("unable to check /dev/shm: {}".format(e))
shm_segs = Segment()
if query_segs & shm_segs == query_segs:
shm_end_time = shm_segs[-1][1]
query_end_time = query_segment[1]
# ### first check if low-latency frames are available
# logging.info("checking if data is available in /dev/shm...")
# try:
# shm_segs = find_shm_segments()
# except ImportError as e:
# logging.info("unable to check /dev/shm: {}".format(e))
# shm_segs = Segment()
# if query_segs & shm_segs == query_segs:
# shm_end_time = shm_segs[-1][1]
# query_end_time = query_segment[1]
### check if time requested is too new, if so,
### sleep until it is available
if query_end_time > shm_end_time:
time.sleep(query_end_time - shm_end_time)
shm_segs = find_shm_segments()
# ### check if time requested is too new, if so,
# ### sleep until it is available
# if query_end_time > shm_end_time:
# time.sleep(query_end_time - shm_end_time)
# shm_segs = find_shm_segments()
### check if span of data requested is all available
if query_segs & shm_segs == query_segs:
logging.info("queried data available in /dev/shm")
return True
# ### check if span of data requested is all available
# if query_segs & shm_segs == query_segs:
# logging.info("queried data available in /dev/shm")
# return True
### if shm frames are not available for the time requested,
### wait until raw frames from LDR are available
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment