Commit e432f45e authored by Qarnot computing's avatar Qarnot computing

Fix duplicated plans

parent b6a218be
......@@ -195,7 +195,7 @@ class EOPlanPoller():
self._forced_timestamp_ms = forced_timestamp_ms
async def loop(self):
last_plan_seen = "none_none_none"
all_seen_plans = set()
while True:
log.debug("EOPlanPoller: iteration")
if self._forced_timestamp_ms == 0:
......@@ -208,9 +208,9 @@ class EOPlanPoller():
eo_plans = await self.eo_plan_source.get_eo_plans(self._dc_id, start, end)
for eo_plan in eo_plans:
if eo_plan.aggregate_id != last_plan_seen:
if eo_plan.aggregate_id not in all_seen_plans:
log.warning("Got a new EO plan: %s", eo_plan)
last_plan_seen = eo_plan.aggregate_id
all_seen_plans.add(eo_plan.aggregate_id)
await self._message_queue.put(eo_plan)
else:
log.info("Got EO plan %s, which was already seen, skip", eo_plan.aggregate_id)
......
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