iflL:lL.warning(f"Processor.ProcessorMonitorRunSync: Processor wait more than {lWaitTimeSecFloat} sec. Activity def: {lItemDict['Def']}; GUID: {lItemDict['GUIDStr']}")
else:
lActiveGUIDStr=lItemDict["GUIDStr"]
lActiveTimeStart=time.time()
time.sleep(10)# Sleep when list is empty
exceptExceptionase:
iflL:lL.exception(
f"Processor.ProcessorMonitorRunSync. Something goes very wrong in processor queue. See traceback")
else:raiseException(f"pyOpenRPA Exception: You can't use Orchestrator.ProcessorAliasDefUpdate with arg 'inDef' string value. inDef is '{inDef}', inAliasStr is '{inAliasStr}'")
<codeclass="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><codeclass="sig-name descname">OSFileBinaryDataBase64StrReceive</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inFilePathStr</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileBinaryDataBase64StrReceive"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive"title="Permalink to this definition">¶</a></dt>
<dd><p>Read binary file and encode in base64 to transmit (safe for JSON transmition)</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>inFilePathStr</strong>– File path to read</p></li>
<li><p><strong>inGSettings</strong>– global settings of the Agent (singleton)</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>File content in string base64 format (use base64.b64decode to decode data). Return None if file is not exist</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><codeclass="sig-name descname">OSFileTextDataStrCreate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inFilePathStr</span></em>, <emclass="sig-param"><spanclass="n">inFileDataStr</span></em>, <emclass="sig-param"><spanclass="n">inEncodingStr</span><spanclass="o">=</span><spanclass="default_value">'utf-8'</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileTextDataStrCreate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate"title="Permalink to this definition">¶</a></dt>
<dd><p>Create text file in the agent GUI session</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><codeclass="sig-name descname">OSFileTextDataStrReceive</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inFilePathStr</span></em>, <emclass="sig-param"><spanclass="n">inEncodingStr</span><spanclass="o">=</span><spanclass="default_value">'utf-8'</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileTextDataStrReceive"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive"title="Permalink to this definition">¶</a></dt>
<dd><p>Read text file in the agent GUI session</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><codeclass="sig-name descname">ProcessWOExeUpperUserListGet</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Agent/__Agent__.html#ProcessWOExeUpperUserListGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet"title="Permalink to this definition">¶</a></dt>
<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 can’t transmit Python def object out of the Python environment)</p></td>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">AgentOSFileBinaryDataBase64StrReceive</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span></em>, <emclass="sig-param"><spanclass="n">inHostNameStr</span></em>, <emclass="sig-param"><spanclass="n">inUserStr</span></em>, <emclass="sig-param"><spanclass="n">inFilePathStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentOSFileBinaryDataBase64StrReceive"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrReceive"title="Permalink to this definition">¶</a></dt>
<dd><p>Read binary file and encode in base64 to transmit (safe for JSON transmition)</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>inGSettings</strong>– Global settings dict (singleton)</p></li>
<li><p><strong>inHostNameStr</strong>–</p></li>
<li><p><strong>inUserStr</strong>–</p></li>
<li><p><strong>inFilePathStr</strong>– File path to read</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">AgentProcessWOExeUpperUserListGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span></em>, <emclass="sig-param"><spanclass="n">inHostNameStr</span></em>, <emclass="sig-param"><spanclass="n">inUserStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentProcessWOExeUpperUserListGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>inGSettings</strong>– Global settings dict (singleton)</p></li>
<li><p><strong>inHostNameStr</strong>–</p></li>
<li><p><strong>inUserStr</strong>–</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">GSettingsAutocleaner</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#GSettingsAutocleaner"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsAutocleaner"title="Permalink to this definition">¶</a></dt>
<spanclass="s2">"AliasDefDict"</span><spanclass="p">:</span><spanclass="p">{},</span><spanclass="c1"># Storage for def with Str alias. To use it see pyOpenRPA.Orchestrator.ControlPanel</span>
<spanclass="s2">"CheckIntervalSecFloat"</span><spanclass="p">:</span><spanclass="mf">1.0</span><spanclass="p">,</span><spanclass="c1"># Interval for check gSettings in ProcessorDict > ActivityList</span>
<spanclass="s2">"ExecuteBool"</span><spanclass="p">:</span><spanclass="kc">True</span><spanclass="p">,</span><spanclass="c1"># Flag to execute thread processor</span>
<spanclass="s2">"ThreadIdInt"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Technical field - will be setup when processor init</span>
<spanclass="s2">"ThreadIdInt"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="p">,</span><spanclass="c1"># Technical field - will be setup when processor init</span>
<spanclass="s2">"WarningExecutionMoreThanSecFloat"</span><spanclass="p">:</span><spanclass="mf">60.0</span><spanclass="c1"># Push warning if execution more than n seconds</span>
<spanclass="p">},</span>
<spanclass="s2">"ControlPanelDict"</span><spanclass="p">:</span><spanclass="p">{</span><spanclass="c1"># Old structure > CPDict</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"AGENT Text file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been created."</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"AGENT Binary file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read."</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"AGENT Text file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read."</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
<spanclass="c1">#Send item in AgentDict for the futher data transmition</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
<spanclass="c1">#Send item in AgentDict for the futher data transmition</span>
<spanclass="sd"> Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent</span>
<spanclass="sd"> :param inGSettings: Global settings dict (singleton)</span>
<spanclass="sd"> :param inHostNameStr:</span>
<spanclass="sd"> :param inUserStr:</span>
<spanclass="sd"> :return: GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
<spanclass="c1">#Send item in AgentDict for the futher data transmition</span>
<spanclass="k">else</span><spanclass="p">:</span><spanclass="k">raise</span><spanclass="ne">Exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"pyOpenRPA Exception: You can't use Orchestrator.ProcessorAliasDefUpdate with arg 'inDef' string value. inDef is '</span><spanclass="si">{</span><spanclass="n">inDef</span><spanclass="si">}</span><spanclass="s2">', inAliasStr is '</span><spanclass="si">{</span><spanclass="n">inAliasStr</span><spanclass="si">}</span><spanclass="s2">'"</span><spanclass="p">)</span>
<spanclass="sd"> Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.</span>
@ -905,8 +968,12 @@
<spanclass="sd"> :param inArgDict: Args dict for the def</span>
<spanclass="sd"> :param inArgGSettingsStr: Name of def argument of the GSettings dict</span>
<spanclass="sd"> :param inArgLoggerStr: Name of def argument of the logging object</span>
<spanclass="sd"> :param inGUIDStr: GUID which you can specify. If None the GUID will be generated</span>
<spanclass="sd"> :return: {}</span>
<spanclass="sd">"""</span>
<spanclass="c1"># Work about GUID in Activity items</span>
<spanclass="n">inGUIDStr</span><spanclass="o">=</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="n">uuid</span><spanclass="o">.</span><spanclass="n">uuid4</span><spanclass="p">())</span><spanclass="c1"># generate new GUID</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="n">inArgGSettingsStr</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="n">inArgLoggerStr</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="n">inArgLoggerStr</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="n">lGUIDStr</span><spanclass="o">=</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="n">uuid</span><spanclass="o">.</span><spanclass="n">uuid4</span><spanclass="p">())</span><spanclass="c1"># generate new GUID</span>
<spanclass="n">lProcessorThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="s2">"Processor has been started (ProcessorDict)"</span><spanclass="p">)</span><spanclass="c1">#Logging</span>
<spanclass="n">lProcessorMonitorThread</span><spanclass="o">.</span><spanclass="n">daemon</span><spanclass="o">=</span><spanclass="kc">True</span><spanclass="c1"># Run the thread in daemon mode.</span>
<spanclass="n">lProcessorMonitorThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="s2">"Processor monitor has been started"</span><spanclass="p">)</span><spanclass="c1">#Logging</span>
<spanclass="n">gDaemonActivityLogDictRefreshSecInt</span><spanclass="o">=</span><spanclass="mi">10</span><spanclass="c1"># The second period for clear lDaemonActivityLogDict from old items</span>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnGet">AgentActivityItemReturnGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD">AgentOSCMD() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrCreate">AgentOSFileBinaryDataBase64StrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrReceive">AgentOSFileBinaryDataBase64StrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBytesCreate">AgentOSFileBinaryDataBytesCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrCreate">AgentOSFileTextDataStrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive">AgentOSFileTextDataStrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet">AgentProcessWOExeUpperUserListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
</tr></table>
@ -270,6 +276,12 @@
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify">OSCredentialsVerify() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate">OSFileBinaryDataBase64StrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive">OSFileBinaryDataBase64StrReceive() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">OSFileTextDataStrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">OSFileTextDataStrReceive() (in module pyOpenRPA.Agent.__Agent__)</a>
Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent
Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent
* **Parameters**
* **inGSettings** – Global settings dict (singleton)
* **inHostNameStr** –
* **inUserStr** –
* **Returns**
GUID String of the ActivityItem - you can wait (sync or async) result by this guid!