diff --git a/Sources/pyOpenRPA/Agent/O2A.py b/Sources/pyOpenRPA/Agent/O2A.py index d3ed4153..38b92316 100644 --- a/Sources/pyOpenRPA/Agent/O2A.py +++ b/Sources/pyOpenRPA/Agent/O2A.py @@ -37,9 +37,6 @@ def O2A_Loop(inGSettings): lActivityLastGUIDStr = lQueueItem["GUIDStr"] inGSettings["ProcessorDict"]["ActivityList"].append(lQueueItem) if lL: lL.debug(f"ActivityItem was received from orchestrator: {lQueueItem}"); - except Exception as e: - if lL: lL.exception(f"O2A Error handler. Sleep for {inGSettings['A2ODict']['RetryTimeoutSecFloat']} s.") - time.sleep(inGSettings["O2ADict"]["RetryTimeoutSecFloat"]) except requests.exceptions.ConnectionError as e: if lL: lL.error(f"O2A Connection error - orchestrator is not available. Sleep for {inGSettings['A2ODict']['RetryTimeoutSecFloat']} s.") time.sleep(inGSettings["O2ADict"]["RetryTimeoutSecFloat"]) @@ -47,6 +44,8 @@ def O2A_Loop(inGSettings): if lL: lL.error(f"O2A Connection error - orchestrator is not available. Sleep for {inGSettings['A2ODict']['RetryTimeoutSecFloat']} s.") time.sleep(inGSettings["O2ADict"]["RetryTimeoutSecFloat"]) except json.decoder.JSONDecodeError as e: - if lL: lL.error( - f"See body of the recieved content from the Orchestrator: {lRequestBody}") + if lL: lL.error(f"See body of the recieved content from the Orchestrator: {lRequestBody}") + time.sleep(inGSettings["O2ADict"]["RetryTimeoutSecFloat"]) + except Exception as e: + if lL: lL.exception(f"O2A Error handler. Sleep for {inGSettings['A2ODict']['RetryTimeoutSecFloat']} s.") time.sleep(inGSettings["O2ADict"]["RetryTimeoutSecFloat"]) \ No newline at end of file diff --git a/Sources/pyOpenRPA/Orchestrator/ServerSettings.py b/Sources/pyOpenRPA/Orchestrator/ServerSettings.py index 6610118c..fd629a97 100644 --- a/Sources/pyOpenRPA/Orchestrator/ServerSettings.py +++ b/Sources/pyOpenRPA/Orchestrator/ServerSettings.py @@ -393,7 +393,7 @@ def pyOpenRPA_Agent_O2A(inRequest, inGSettings): else: # no queue item - sleep for the next iteration time.sleep(1) except Exception as e: - pass + if lL: lL.exception("pyOpenRPA_Agent_O2A Exception!") lThisAgentDict["ConnectionCountInt"] -= 1 # Connection go to be closed - decrement the connection count # See docs in Agent (pyOpenRPA.Agent.A2O) def pyOpenRPA_Agent_A2O(inRequest, inGSettings):