SIENTIAPDE-1095

Fix decoding of active ingestors to handle both bytes and string types
This commit is contained in:
vitor-aignosi
2025-06-09 17:19:53 -03:00
parent 3bb0c45af8
commit a0d8f96a99

View File

@@ -67,7 +67,15 @@ class SlotManager(Redis):
self.logger.debug("Active ingestors: \n %s", active_ingestors)
return [ingestor.decode('utf-8') for ingestor in active_ingestors]
ingestors = []
for ingestor in active_ingestors:
if isinstance(ingestor, bytes):
ingestors.append(ingestor.decode('utf-8'))
else:
ingestors.append(ingestor)
return ingestors
@activity.defn(name="update_slots")
async def update_slots(self, input_data: dict[str, Any]) -> dict[str, Any]: