From cdd418a1bf025c843f9af37b3941711aee6bf11d Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Tue, 24 May 2022 08:58:22 +0300 Subject: [PATCH] # add init_debug --- .gitignore | 2 ++ .../GuideSphinx/03_Copyrights_Contacts.rst | 2 +- Sources/GuideSphinx/Tools/02_Defs.rst | 5 ++++ .../Orchestrator/__Orchestrator__.py | 4 ++++ Sources/pyOpenRPA/Tools/Debugger.py | 23 +++++++++++++++++++ changelog.md | 14 +++++++++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 Sources/pyOpenRPA/Tools/Debugger.py diff --git a/.gitignore b/.gitignore index 3f58b938..fad29672 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ /**/Resources/GoogleChromePortable #Игнорируем все папки с названием __pycache__ /**/__pycache__/** +/Wiki/ENG_Guide/html/** +/Wiki/ENG_Guide/markdown/** #Игнорируем папки распакованного блокнота /**/Resources/Editor/Notepad++_7_7_x64/* /**/Resources/Editor/Notepad++_7_7_x32/* diff --git a/Sources/GuideSphinx/03_Copyrights_Contacts.rst b/Sources/GuideSphinx/03_Copyrights_Contacts.rst index b67d5cc2..8cfebd97 100644 --- a/Sources/GuideSphinx/03_Copyrights_Contacts.rst +++ b/Sources/GuideSphinx/03_Copyrights_Contacts.rst @@ -39,4 +39,4 @@ Our contacts: - Semantic UI ..., license MIT (https://github.com/Semantic-Org/Semantic-UI) - PyAutoGUI ..., license BSD 3-Clause (https://github.com/asweigart/pyautogui) - keyboard ..., license MIT (https://github.com/boppreh/keyboard) -- pywin32 \ No newline at end of file +- pywin32 ..., Python Software Foundation License (PSF) (https://github.com/mhammond/pywin32) \ No newline at end of file diff --git a/Sources/GuideSphinx/Tools/02_Defs.rst b/Sources/GuideSphinx/Tools/02_Defs.rst index e12fb213..b7ed9486 100644 --- a/Sources/GuideSphinx/Tools/02_Defs.rst +++ b/Sources/GuideSphinx/Tools/02_Defs.rst @@ -13,6 +13,11 @@ How to use StopSafe on the robot side .. automodule:: pyOpenRPA.Tools.StopSafe :members: :autosummary: + + +.. automodule:: pyOpenRPA.Tools.Debugger + :members: + :autosummary: ********** diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index 868f5646..c8b46e5a 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -13,6 +13,7 @@ from . import Managers from ..Tools import License from subprocess import CREATE_NEW_CONSOLE from .Utils import LoggerHandlerDumpLogList +from ..Tools import Debugger # ATTENTION! HERE IS NO Relative import because it will be imported dynamically # All function check the flag SessionIsWindowResponsibleBool == True else no cammand is processed @@ -2836,6 +2837,9 @@ def Orchestrator(inGSettings=None, inDumpRestoreBool = True, inRunAsAdministrato lThread = threading.Thread(target= lProcess.StatusRestore) lThread.start() + # Init debug thread (run if "init_dubug" file exists) + Debugger.LiveDebugCheckThread(inGSettings=GSettingsGet()) + def __schedule_loop__(): while True: schedule.run_pending() diff --git a/Sources/pyOpenRPA/Tools/Debugger.py b/Sources/pyOpenRPA/Tools/Debugger.py new file mode 100644 index 00000000..8ac41f13 --- /dev/null +++ b/Sources/pyOpenRPA/Tools/Debugger.py @@ -0,0 +1,23 @@ +import os +import threading +import pdb +import time + +"""Module wait file "init_debug" in working directory +""" + +gKWARGS = None + +def LiveDebugCheckLoop(): + while True: + if os.path.exists("init_debug"): + pdb.set_trace() + time.sleep(30.0) + +def LiveDebugCheckThread(**inKWARGS): + """Create thread to wait file appear "init_debug" in the working directory. + """ + global gKWARGS + gKWARGS = inKWARGS + lThread = threading.Thread(target=LiveDebugCheckLoop) + lThread.start() \ No newline at end of file diff --git a/changelog.md b/changelog.md index d9d3bb23..064aa92c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,17 @@ +[1.2.12] +2022_Q2 +- ORCHESTRATOR +- - Raise debug session from production. Support init_debug file in working directory +- - MANAGERS +- - - ControlPanel +- - - Git CI +- - - Process +- - Support Linux Ubuntu +- ROBOT +- - Support Linux Ubuntu +- STUDIO +- - Support Linux Ubuntu + [1.2.0] !Orchestrator! - Consolidated processor from old orchestrator and from RDPActive processor (one threaded). Look in GSettings