From 4e868f6898ad45b3413519da8143637bd81959a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=9C=D0=B0=D1=81=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2?= Date: Fri, 25 Nov 2022 16:46:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=93=D0=A2:=20=D0=9C=D0=B8=D0=BD=D0=BE?= =?UTF-8?q?=D1=80=D0=BD=D0=B0=D1=8F=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= =?UTF-8?q?,=20=D1=83=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20=D1=81=D0=BE=D0=BE?= =?UTF-8?q?=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=B1=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BA=D0=B5,=20=D0=B5=D1=81=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=BE=D1=82=20=D0=BE=D1=80=D0=BA=D0=B0=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=D1=88=D0=B5=D0=BB=20None?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/pyOpenRPA/Agent/O2A.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) 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: