diff --git a/Sources/pyOpenRPA/Agent/O2A.py b/Sources/pyOpenRPA/Agent/O2A.py index f1a61771..52ee718a 100755 --- a/Sources/pyOpenRPA/Agent/O2A.py +++ b/Sources/pyOpenRPA/Agent/O2A.py @@ -42,20 +42,21 @@ def O2A_Loop(inGSettings): lBodyLenInt = len(lRequestBody) if lBodyLenInt != 0: # CHeck if not empty result when close the connection from orch lQueueList = lResponse.json() # Try to get JSON - for lQueueItem in lQueueList: - # Append QUEUE item in ProcessorDict > ActivityList - lActivityLastGUIDStr = lQueueItem["GUIDStr"] - # Check if ActivityItem ["ThreadBool"] = False > go sync mode in processor queue; Else: New thread - if lQueueItem.get("ThreadBool",False) == False: - inGSettings["ProcessorDict"]["ActivityList"].append(lQueueItem) - else: - Processor.ProcessorRunAsync(inGSettings=inGSettings,inActivityList=[lQueueItem]) - # Log full version if bytes size is less than limit . else short - lAgentLimitLogSizeBytesInt = 500 - if lBodyLenInt <= lAgentLimitLogSizeBytesInt: - if lL: lL.info(f"Словарь ActivityItem, полученный от оркестратора: {lQueueItem}") - else: - if lL: lL.info(f"Словарь ActivityItem, полученный от оркестратора: содержимое свернуто из-за большого размера ({lBodyLenInt} байт") + if lQueueList != None: + for lQueueItem in lQueueList: + # Append QUEUE item in ProcessorDict > ActivityList + lActivityLastGUIDStr = lQueueItem["GUIDStr"] + # Check if ActivityItem ["ThreadBool"] = False > go sync mode in processor queue; Else: New thread + if lQueueItem.get("ThreadBool",False) == False: + inGSettings["ProcessorDict"]["ActivityList"].append(lQueueItem) + else: + Processor.ProcessorRunAsync(inGSettings=inGSettings,inActivityList=[lQueueItem]) + # Log full version if bytes size is less than limit . else short + lAgentLimitLogSizeBytesInt = 500 + if lBodyLenInt <= lAgentLimitLogSizeBytesInt: + if lL: lL.info(f"Словарь ActivityItem, полученный от оркестратора: {lQueueItem}") + else: + if lL: lL.info(f"Словарь ActivityItem, полученный от оркестратора: содержимое свернуто из-за большого размера ({lBodyLenInt} байт") else: if lL: lL.debug(f"Поступил пустой ответ от оркестратора - цикл попытается обновить соединение между оркестратором и агентом"); except requests.exceptions.ConnectionError as e: