Skip to content
Snippets Groups Projects
Commit e94394a2 authored by Adriaan Renting's avatar Adriaan Renting
Browse files

Task #8887: changed RATaskSpecified to handle non-otdb predecesors

parent 7a33641c
No related branches found
No related tags found
No related merge requests found
...@@ -208,16 +208,16 @@ class RATaskSpecified(OTDBBusListener): ...@@ -208,16 +208,16 @@ class RATaskSpecified(OTDBBusListener):
# Key contains values starting with 'S' = Scheduler, 'L'/'T' = OTDB, 'M' = MoM # Key contains values starting with 'S' = Scheduler, 'L'/'T' = OTDB, 'M' = MoM
# 'S' we can probably ignore? Might be only internal in the Scheduler? # 'S' we can probably ignore? Might be only internal in the Scheduler?
result = set() result = []
for s in stringlist: for s in stringlist:
try: # Made the source a string for readability, but it's not efficient try: # Made the source a string for readability, but it's not efficient
if s.startswith('M'): if s.startswith('M'):
result.add({'source': 'mom', 'id': int(s[1:])}) result.append({'source': 'mom', 'id': int(s[1:])})
elif s.startswith('L') or s.startswith('T'): elif s.startswith('L') or s.startswith('T'):
result.add({'source': 'otdb', 'id': int(s[1:])}) result.append({'source': 'otdb', 'id': int(s[1:])})
else: # 'S' else: # 'S'
logger.info("found a predecessor ID I can't handle: %s" % s) logger.info("found a predecessor ID I can't handle: %s" % s)
result.add({'source': 'other', 'id': int(s[1:])}) result.append({'source': 'other', 'id': int(s[1:])})
except ValueError: except ValueError:
logger.warning("found a predecessor ID that I can't parse %s" % s) logger.warning("found a predecessor ID that I can't parse %s" % s)
return result return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment