Add Orchestrator ProcessDefIntervalCall - very helpfull function for the periodic call

Update Guide
dev-linux
Ivan Maslov 4 years ago
parent b0b821aed8
commit f1b0472fce

@ -942,6 +942,50 @@ def ProcessListGet(inProcessNameWOExeList=None):
pass
return lResult
def ProcessDefIntervalCall(inDef, inIntervalSecFloat, inIntervalAsyncBool=False, inDefArgList=None, inDefArgDict=None, inExecuteInNewThreadBool=True, inLogger=None):
"""
Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :)
:param inDef: def link, which will be called with interval inIntervalSecFloat
:param inIntervalSecFloat: Interval in seconds between call
:param inIntervalAsyncBool: False - wait interval before next call after the previous iteration result; True - wait interval after previous iteration call
:param inDefArgList: List of the args in def. Default None (empty list)
:param inDefArgDict: Dict of the args in def. Default None (empty dict)
:param inExecuteInNewThreadBool: True - create new thread for the periodic execution; False - execute in current thread. Default: True
:return:
"""
#Some edits on start
if inDefArgDict is None: inDefArgDict = {}
if inDefArgList is None: inDefArgList = []
# Internal def to execute periodically
def __Execute__(inDef, inIntervalSecFloat, inIntervalAsyncBool, inDefArgList, inDefArgDict, inLogger):
while True:
try:
# Call async if needed
if inIntervalAsyncBool==False: # Case wait result then wait
inDef(*inDefArgList, **inDefArgDict)
else: # Case dont wait result - run sleep then new iteration (use many threads)
lThread2 = threading.Thread(target=__Execute__,
kwargs={"inDef": inDef, "inIntervalSecFloat": inIntervalSecFloat,
"inIntervalAsyncBool": inIntervalAsyncBool, "inDefArgList": inDefArgList,
"inDefArgDict": inDefArgDict})
lThread2.start()
except Exception as e:
if inLogger: inLogger.exception(f"ProcessDefIntervalCall: Interval call has been failed. Traceback is below. Code will sleep for the next call")
# Sleep interval
time.sleep(inIntervalSecFloat)
# Check to call in new thread
if inExecuteInNewThreadBool:
lThread = threading.Thread(target=__Execute__,
kwargs={"inDef":inDef, "inIntervalSecFloat":inIntervalSecFloat,
"inIntervalAsyncBool":inIntervalAsyncBool, "inDefArgList":inDefArgList,
"inDefArgDict":inDefArgDict, "inLogger":inLogger})
lThread.start()
else:
__Execute__(inDef=inDef, inIntervalSecFloat=inIntervalSecFloat, inIntervalAsyncBool=inIntervalAsyncBool, inDefArgList=inDefArgList, inDefArgDict=inDefArgDict, inLogger=inLogger)
# Python def - start module function
def PythonStart(inModulePathStr, inDefNameStr, inArgList=None, inArgDict=None, inLogger = None):
"""

@ -305,103 +305,106 @@
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorSessionSave</span></code></a>([inGSettings])</p></td>
<td><p>Orchestrator session save in file _SessionLast_RDPList.json (encoding = “utf-8”)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessIsStarted</span></code></a>(inProcessNameWOExeStr)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessDefIntervalCall</span></code></a>(inDef, inIntervalSecFloat)</p></td>
<td><p>Use this procedure if you need to run periodically some def.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessIsStarted</span></code></a>(inProcessNameWOExeStr)</p></td>
<td><p>Check if there is any running process that contains the given name processName.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessListGet</span></code></a>([inProcessNameWOExeList])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessListGet</span></code></a>([inProcessNameWOExeList])</p></td>
<td><p>Return process list on the orchestrator machine sorted by Memory Usage.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStart</span></code></a>(inPathStr, inArgList[, …])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStart</span></code></a>(inPathStr, inArgList[, …])</p></td>
<td><p>Start process locally.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStop</span></code></a>(inProcessNameWOExeStr, …[, …])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStop</span></code></a>(inProcessNameWOExeStr, …[, …])</p></td>
<td><p>Stop process on the orchestrator machine.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemAppend</span></code></a>(inGSettings[, …])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemAppend</span></code></a>(inGSettings[, …])</p></td>
<td><p>Create and add activity item in processor queue.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemCreate</span></code></a>(inDef[, …])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemCreate</span></code></a>(inDef[, …])</p></td>
<td><p>Create activity item.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorAliasDefCreate</span></code></a>(inGSettings, inDef)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorAliasDefCreate</span></code></a>(inGSettings, inDef)</p></td>
<td><p>Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you cant transmit Python def object out of the Python environment)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorAliasDefUpdate</span></code></a>(inGSettings, inDef, …)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorAliasDefUpdate</span></code></a>(inGSettings, inDef, …)</p></td>
<td><p>Update alias for def (can be used in ActivityItem in field Def).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PythonStart</span></code></a>(inModulePathStr, inDefNameStr[, …])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PythonStart</span></code></a>(inModulePathStr, inDefNameStr[, …])</p></td>
<td><p>Import module and run def in the Orchestrator process.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionCMDRun" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionCMDRun"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionCMDRun</span></code></a>(inGSettings, …[, inModeStr])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionCMDRun" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionCMDRun"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionCMDRun</span></code></a>(inGSettings, …[, inModeStr])</p></td>
<td><p>Send CMD command to the RDP session “RUN” window</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionConnect" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionConnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionConnect</span></code></a>(inGSettings, …[, …])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionConnect" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionConnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionConnect</span></code></a>(inGSettings, …[, …])</p></td>
<td><p>Create new RDPSession in RobotRDPActive. Attention - activity will be ignored if RDP key is already exists</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDisconnect" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDisconnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionDisconnect</span></code></a>(inGSettings, …[, …])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDisconnect" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDisconnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionDisconnect</span></code></a>(inGSettings, …[, …])</p></td>
<td><p>Disconnect the RDP session and stop monitoring it.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDublicatesResolve" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDublicatesResolve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionDublicatesResolve</span></code></a>(inGSettings)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDublicatesResolve" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDublicatesResolve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionDublicatesResolve</span></code></a>(inGSettings)</p></td>
<td><p>DEVELOPING Search duplicates in GSettings RDPlist !def is developing!</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredRecieve" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredRecieve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionFileStoredRecieve</span></code></a>(inGSettings, …)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredRecieve" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredRecieve"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionFileStoredRecieve</span></code></a>(inGSettings, …)</p></td>
<td><p>Recieve file from RDP session to the Orchestrator session using shared drive in RDP (see RDP Configuration Dict, Shared drive)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredSend" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredSend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionFileStoredSend</span></code></a>(inGSettings, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredSend" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredSend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionFileStoredSend</span></code></a>(inGSettings, …)</p></td>
<td><p>Send file from Orchestrator session to the RDP session using shared drive in RDP (see RDP Configuration Dict, Shared drive)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionLogoff" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionLogoff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionLogoff</span></code></a>(inGSettings, inRDPSessionKeyStr)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionLogoff" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionLogoff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionLogoff</span></code></a>(inGSettings, inRDPSessionKeyStr)</p></td>
<td><p>Logoff the RDP session from the Orchestrator process (close all apps in session when logoff)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionMonitorStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionMonitorStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionMonitorStop</span></code></a>(inGSettings, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionMonitorStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionMonitorStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionMonitorStop</span></code></a>(inGSettings, …)</p></td>
<td><p>Stop monitoring the RDP session by the Orchestrator process.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStartIfNotRunning" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStartIfNotRunning"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionProcessStartIfNotRunning</span></code></a>(…[, …])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStartIfNotRunning" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStartIfNotRunning"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionProcessStartIfNotRunning</span></code></a>(…[, …])</p></td>
<td><p>Start process in RDP if it is not running (check by the arg inProcessNameWEXEStr)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionProcessStop</span></code></a>(inGSettings, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionProcessStop</span></code></a>(inGSettings, …)</p></td>
<td><p>Send CMD command to the RDP session “RUN” window.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionReconnect" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionReconnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionReconnect</span></code></a>(inGSettings, …[, …])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionReconnect" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionReconnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionReconnect</span></code></a>(inGSettings, …[, …])</p></td>
<td><p>Reconnect the RDP session</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionResponsibilityCheck" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionResponsibilityCheck"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionResponsibilityCheck</span></code></a>(inGSettings, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionResponsibilityCheck" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionResponsibilityCheck"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPSessionResponsibilityCheck</span></code></a>(inGSettings, …)</p></td>
<td><p>DEVELOPING, MAYBE NOT USEFUL Check RDP Session responsibility TODO NEED DEV + TEST</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPTemplateCreate</span></code></a>(inLoginStr, inPasswordStr)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RDPTemplateCreate</span></code></a>(inLoginStr, inPasswordStr)</p></td>
<td><p>Create RDP connect dict item/ Use it connect/reconnect (Orchestrator.RDPSessionConnect)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly" title="pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SchedulerActivityTimeAddWeekly</span></code></a>(inGSettings)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly" title="pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SchedulerActivityTimeAddWeekly</span></code></a>(inGSettings)</p></td>
<td><p>Add activity item list in scheduler.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.UACKeyListCheck" title="pyOpenRPA.Orchestrator.__Orchestrator__.UACKeyListCheck"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UACKeyListCheck</span></code></a>(inRequest, inRoleKeyList)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.UACKeyListCheck" title="pyOpenRPA.Orchestrator.__Orchestrator__.UACKeyListCheck"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UACKeyListCheck</span></code></a>(inRequest, inRoleKeyList)</p></td>
<td><p>Check is client is has access for the key list</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.UACSuperTokenUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.UACSuperTokenUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UACSuperTokenUpdate</span></code></a>(inGSettings, inSuperTokenStr)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.UACSuperTokenUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.UACSuperTokenUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UACSuperTokenUpdate</span></code></a>(inGSettings, inSuperTokenStr)</p></td>
<td><p>Add supertoken for the all access (it is need for the robot communication without human)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.UACUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.UACUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UACUpdate</span></code></a>(inGSettings, inADLoginStr[, …])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.UACUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.UACUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UACUpdate</span></code></a>(inGSettings, inADLoginStr[, …])</p></td>
<td><p>Update user access (UAC)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebCPUpdate</span></code></a>(inGSettings, inCPKeyStr[, …])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebCPUpdate</span></code></a>(inGSettings, inCPKeyStr[, …])</p></td>
<td><p>Add control panel HTML, JSON generator or JS when page init</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectDef</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectDef</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<td><p>Connect URL to DEF</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFile</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFile</span></code></a>(inGSettings, inMethodStr, …)</p></td>
<td><p>Connect URL to File</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFolder</span></code></a>(inGSettings, …)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectFolder"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebURLConnectFolder</span></code></a>(inGSettings, …)</p></td>
<td><p>Connect URL to Folder</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserInfoGet</span></code></a>(inRequest)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserInfoGet</span></code></a>(inRequest)</p></td>
<td><p>Return User info about request</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserIsSuperToken</span></code></a>(inRequest, inGSettings)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserIsSuperToken</span></code></a>(inRequest, inGSettings)</p></td>
<td><p>Return bool if request is authentificated with supetoken (token which is never expires)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserUACHierarchyGet</span></code></a>(inRequest)</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">WebUserUACHierarchyGet</span></code></a>(inRequest)</p></td>
<td><p>Return User UAC Hierarchy DICT Return {…}</p></td>
</tr>
</tbody>
@ -726,6 +729,27 @@
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessDefIntervalCall</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inIntervalSecFloat</span></em>, <em class="sig-param"><span class="n">inIntervalAsyncBool</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">inDefArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inExecuteInNewThreadBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessDefIntervalCall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall" title="Permalink to this definition"></a></dt>
<dd><p>Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inDef</strong> def link, which will be called with interval inIntervalSecFloat</p></li>
<li><p><strong>inIntervalSecFloat</strong> Interval in seconds between call</p></li>
<li><p><strong>inIntervalAsyncBool</strong> False - wait interval before next call after the previous iteration result; True - wait interval after previous iteration call</p></li>
<li><p><strong>inDefArgList</strong> List of the args in def. Default None (empty list)</p></li>
<li><p><strong>inDefArgDict</strong> Dict of the args in def. Default None (empty dict)</p></li>
<li><p><strong>inExecuteInNewThreadBool</strong> True - create new thread for the periodic execution; False - execute in current thread. Default: True</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessIsStarted</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeStr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessIsStarted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted" title="Permalink to this definition"></a></dt>

@ -1123,6 +1123,50 @@
<span class="k">pass</span>
<span class="k">return</span> <span class="n">lResult</span></div>
<div class="viewcode-block" id="ProcessDefIntervalCall"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">[docs]</a><span class="k">def</span> <span class="nf">ProcessDefIntervalCall</span><span class="p">(</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inIntervalSecFloat</span><span class="p">,</span> <span class="n">inIntervalAsyncBool</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">inDefArgList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inDefArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inExecuteInNewThreadBool</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">inLogger</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :)</span>
<span class="sd"> :param inDef: def link, which will be called with interval inIntervalSecFloat</span>
<span class="sd"> :param inIntervalSecFloat: Interval in seconds between call</span>
<span class="sd"> :param inIntervalAsyncBool: False - wait interval before next call after the previous iteration result; True - wait interval after previous iteration call</span>
<span class="sd"> :param inDefArgList: List of the args in def. Default None (empty list)</span>
<span class="sd"> :param inDefArgDict: Dict of the args in def. Default None (empty dict)</span>
<span class="sd"> :param inExecuteInNewThreadBool: True - create new thread for the periodic execution; False - execute in current thread. Default: True</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1">#Some edits on start</span>
<span class="k">if</span> <span class="n">inDefArgDict</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inDefArgDict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">if</span> <span class="n">inDefArgList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inDefArgList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="c1"># Internal def to execute periodically</span>
<span class="k">def</span> <span class="nf">__Execute__</span><span class="p">(</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inIntervalSecFloat</span><span class="p">,</span> <span class="n">inIntervalAsyncBool</span><span class="p">,</span> <span class="n">inDefArgList</span><span class="p">,</span> <span class="n">inDefArgDict</span><span class="p">,</span> <span class="n">inLogger</span><span class="p">):</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Call async if needed</span>
<span class="k">if</span> <span class="n">inIntervalAsyncBool</span><span class="o">==</span><span class="kc">False</span><span class="p">:</span> <span class="c1"># Case wait result then wait</span>
<span class="n">inDef</span><span class="p">(</span><span class="o">*</span><span class="n">inDefArgList</span><span class="p">,</span> <span class="o">**</span><span class="n">inDefArgDict</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="c1"># Case dont wait result - run sleep then new iteration (use many threads)</span>
<span class="n">lThread2</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">__Execute__</span><span class="p">,</span>
<span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inDef&quot;</span><span class="p">:</span> <span class="n">inDef</span><span class="p">,</span> <span class="s2">&quot;inIntervalSecFloat&quot;</span><span class="p">:</span> <span class="n">inIntervalSecFloat</span><span class="p">,</span>
<span class="s2">&quot;inIntervalAsyncBool&quot;</span><span class="p">:</span> <span class="n">inIntervalAsyncBool</span><span class="p">,</span> <span class="s2">&quot;inDefArgList&quot;</span><span class="p">:</span> <span class="n">inDefArgList</span><span class="p">,</span>
<span class="s2">&quot;inDefArgDict&quot;</span><span class="p">:</span> <span class="n">inDefArgDict</span><span class="p">})</span>
<span class="n">lThread2</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inLogger</span><span class="p">:</span> <span class="n">inLogger</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;ProcessDefIntervalCall: Interval call has been failed. Traceback is below. Code will sleep for the next call&quot;</span><span class="p">)</span>
<span class="c1"># Sleep interval</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">inIntervalSecFloat</span><span class="p">)</span>
<span class="c1"># Check to call in new thread</span>
<span class="k">if</span> <span class="n">inExecuteInNewThreadBool</span><span class="p">:</span>
<span class="n">lThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">__Execute__</span><span class="p">,</span>
<span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inDef&quot;</span><span class="p">:</span><span class="n">inDef</span><span class="p">,</span> <span class="s2">&quot;inIntervalSecFloat&quot;</span><span class="p">:</span><span class="n">inIntervalSecFloat</span><span class="p">,</span>
<span class="s2">&quot;inIntervalAsyncBool&quot;</span><span class="p">:</span><span class="n">inIntervalAsyncBool</span><span class="p">,</span> <span class="s2">&quot;inDefArgList&quot;</span><span class="p">:</span><span class="n">inDefArgList</span><span class="p">,</span>
<span class="s2">&quot;inDefArgDict&quot;</span><span class="p">:</span><span class="n">inDefArgDict</span><span class="p">,</span> <span class="s2">&quot;inLogger&quot;</span><span class="p">:</span><span class="n">inLogger</span><span class="p">})</span>
<span class="n">lThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">__Execute__</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inIntervalSecFloat</span><span class="o">=</span><span class="n">inIntervalSecFloat</span><span class="p">,</span> <span class="n">inIntervalAsyncBool</span><span class="o">=</span><span class="n">inIntervalAsyncBool</span><span class="p">,</span> <span class="n">inDefArgList</span><span class="o">=</span><span class="n">inDefArgList</span><span class="p">,</span> <span class="n">inDefArgDict</span><span class="o">=</span><span class="n">inDefArgDict</span><span class="p">,</span> <span class="n">inLogger</span><span class="o">=</span><span class="n">inLogger</span><span class="p">)</span></div>
<span class="c1"># Python def - start module function</span>
<div class="viewcode-block" id="PythonStart"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart">[docs]</a><span class="k">def</span> <span class="nf">PythonStart</span><span class="p">(</span><span class="n">inModulePathStr</span><span class="p">,</span> <span class="n">inDefNameStr</span><span class="p">,</span> <span class="n">inArgList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLogger</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>

@ -277,6 +277,8 @@
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -292,11 +294,11 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication">PWASpecification_Get_PWAApplication() (in module pyOpenRPA.Robot.UIDesktop)</a>
</li>
<li><a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO">PWASpecification_Get_UIO() (in module pyOpenRPA.Robot.UIDesktop)</a>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -134,6 +134,11 @@ Work with activity scheduling.
| Orchestrator session save in file _SessionLast_RDPList.json (encoding = “utf-8”)
|
| `ProcessDefIntervalCall`(inDef, inIntervalSecFloat)
| Use this procedure if you need to run periodically some def.
|
| `ProcessIsStarted`(inProcessNameWOExeStr)
| Check if there is any running process that contains the given name processName.
@ -710,6 +715,37 @@ Orchestrator session save in file _SessionLast_RDPList.json (encoding = “utf-8
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall(inDef, inIntervalSecFloat, inIntervalAsyncBool=False, inDefArgList=None, inDefArgDict=None, inExecuteInNewThreadBool=True, inLogger=None)
Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :)
* **Parameters**
* **inDef** def link, which will be called with interval inIntervalSecFloat
* **inIntervalSecFloat** Interval in seconds between call
* **inIntervalAsyncBool** False - wait interval before next call after the previous iteration result; True - wait interval after previous iteration call
* **inDefArgList** List of the args in def. Default None (empty list)
* **inDefArgDict** Dict of the args in def. Default None (empty dict)
* **inExecuteInNewThreadBool** True - create new thread for the periodic execution; False - execute in current thread. Default: True
* **Returns**
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted(inProcessNameWOExeStr)
Check if there is any running process that contains the given name processName.

Loading…
Cancel
Save