Upgrade guide!

dev-linux
Ivan Maslov 4 years ago
parent 3b2c4e3888
commit 8e1b98f5bd

@ -305,21 +305,15 @@
<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__.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>
<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>(inGSettings, inDef, …)</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__.ProcessGSettingsGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessGSettingsGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessGSettingsGet</span></code></a>()</p></td>
<td><p>Return GSettings (singleton) from global variable</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-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__.ProcessLoggerGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessLoggerGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessLoggerGet</span></code></a>()</p></td>
<td><p>Return Logger from global variable</p></td>
</tr>
<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>
@ -737,17 +731,21 @@
<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>
<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">inGSettings</span></em>, <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">inDefArgGSettingsNameStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgLoggerNameStr</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>inGSettings</strong> global settings</p></li>
<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>inDefArgGSettingsNameStr</strong> Name of the GSettings arg name for def (optional)</p></li>
<li><p><strong>inDefArgLoggerNameStr</strong> Name of the Logger arg name for def (optional). If Use - please check fill of the inLogger arg.</p></li>
<li><p><strong>inExecuteInNewThreadBool</strong> True - create new thread for the periodic execution; False - execute in current thread. Default: True</p></li>
<li><p><strong>inLogger</strong> logging def if some case is appear</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
@ -756,17 +754,6 @@
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessGSettingsGet">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessGSettingsGet</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessGSettingsGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessGSettingsGet" title="Permalink to this definition"></a></dt>
<dd><p>Return GSettings (singleton) from global variable</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><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>
@ -826,17 +813,6 @@
</div></blockquote>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessLoggerGet">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessLoggerGet</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessLoggerGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessLoggerGet" title="Permalink to this definition"></a></dt>
<dd><p>Return Logger from global variable</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessStart</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inPathStr</span></em>, <em class="sig-param"><span class="n">inArgList</span></em>, <em class="sig-param"><span class="n">inStopProcessNameWOExeStr</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#ProcessStart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="Permalink to this definition"></a></dt>

@ -1123,68 +1123,82 @@
<span class="k">pass</span>
<span class="k">return</span> <span class="n">lResult</span></div>
<div class="viewcode-block" id="ProcessGSettingsGet"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessGSettingsGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessGSettingsGet</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Return GSettings (singleton) from global variable</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gSettingsDict</span>
<span class="k">return</span> <span class="n">gSettingsDict</span></div>
<div class="viewcode-block" id="ProcessLoggerGet"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessLoggerGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessLoggerGet</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Return Logger from global variable</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gSettingsDict</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="s2">&quot;Logger&quot;</span> <span class="ow">in</span> <span class="n">gSettingsDict</span><span class="p">:</span> <span class="n">lResult</span> <span class="o">=</span> <span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</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>
<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">inGSettings</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">inDefArgGSettingsNameStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inDefArgLoggerNameStr</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 inGSettings: global settings</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 inDefArgGSettingsNameStr: Name of the GSettings arg name for def (optional)</span>
<span class="sd"> :param inDefArgLoggerNameStr: Name of the Logger arg name for def (optional). If Use - please check fill of the inLogger arg.</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"> :param inLogger: logging def if some case is appear</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"># Check if inDefArgLogger is set and inLogger is exist</span>
<span class="k">if</span> <span class="n">inDefArgLoggerNameStr</span><span class="o">==</span><span class="s2">&quot;&quot;</span><span class="p">:</span> <span class="n">inDefArgLoggerNameStr</span><span class="o">=</span><span class="kc">None</span>
<span class="k">if</span> <span class="n">inDefArgGSettingsNameStr</span><span class="o">==</span><span class="s2">&quot;&quot;</span><span class="p">:</span> <span class="n">inDefArgGSettingsNameStr</span><span class="o">=</span><span class="kc">None</span>
<span class="k">if</span> <span class="n">inDefArgLoggerNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">inLogger</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;!ERROR! ProcessDefIntervalCall - You need to send logger in def because your def is require logger. Raise error!&quot;</span><span class="p">)</span>
<span class="c1"># Check thread</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">Core</span><span class="o">.</span><span class="n">IsProcessorThread</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">):</span>
<span class="k">if</span> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]:</span> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;__Orchestrator__.ProcessDefIntervalCall def was called not from processor queue - activity will be append in the processor queue.&quot;</span><span class="p">)</span>
<span class="n">lProcessorActivityDict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;Def&quot;</span><span class="p">:</span> <span class="n">ProcessDefIntervalCall</span><span class="p">,</span> <span class="c1"># def link or def alias (look gSettings[&quot;Processor&quot;][&quot;AliasDefDict&quot;])</span>
<span class="s2">&quot;ArgList&quot;</span><span class="p">:</span> <span class="p">[],</span> <span class="c1"># Args list</span>
<span class="s2">&quot;ArgDict&quot;</span><span class="p">:</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;inDefArgGSettingsNameStr&quot;</span><span class="p">:</span><span class="n">inDefArgGSettingsNameStr</span><span class="p">,</span>
<span class="s2">&quot;inDefArgLoggerNameStr&quot;</span><span class="p">:</span> <span class="n">inDefArgLoggerNameStr</span><span class="p">,</span> <span class="s2">&quot;inExecuteInNewThreadBool&quot;</span><span class="p">:</span> <span class="n">inExecuteInNewThreadBool</span><span class="p">},</span> <span class="c1"># Args dictionary</span>
<span class="s2">&quot;ArgGSettings&quot;</span><span class="p">:</span> <span class="s2">&quot;inGSettings&quot;</span><span class="p">,</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="s2">&quot;ArgLogger&quot;</span><span class="p">:</span> <span class="s2">&quot;inLogger&quot;</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="p">}</span>
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;ProcessorDict&quot;</span><span class="p">][</span><span class="s2">&quot;ActivityList&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lProcessorActivityDict</span><span class="p">)</span>
<span class="k">else</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">def</span> <span class="nf">__Execute__</span><span class="p">(</span><span class="n">inGSettings</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="n">inDefArgGSettingsNameStr</span><span class="p">,</span> <span class="n">inDefArgLoggerNameStr</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">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;__Orchestrator__.ProcessDefIntervalCall: Interval execution has been started. Def: </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="n">inDef</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="c1"># Prepare gSettings and logger args</span>
<span class="k">if</span> <span class="n">inDefArgGSettingsNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">inDefArgDict</span><span class="p">[</span><span class="n">inDefArgGSettingsNameStr</span><span class="p">]</span> <span class="o">=</span> <span class="n">inGSettings</span>
<span class="k">if</span> <span class="n">inDefArgLoggerNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">inDefArgDict</span><span class="p">[</span><span class="n">inDefArgLoggerNameStr</span><span class="p">]</span> <span class="o">=</span> <span class="n">inLogger</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">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">inDef</span><span class="p">,</span>
<span class="n">args</span><span class="o">=</span><span class="n">inDefArgList</span><span class="p">,</span>
<span class="n">kwargs</span><span class="o">=</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="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="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">:</span><span class="n">inGSettings</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="n">__Execute__</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</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>
<span class="n">inDefArgGSettingsNameStr</span><span class="o">=</span><span class="n">inDefArgGSettingsNameStr</span> <span class="p">,</span> <span class="n">inDefArgLoggerNameStr</span><span class="o">=</span><span class="n">inDefArgLoggerNameStr</span><span class="p">)</span></div>
<span class="c1"># Python def - start module function</span>

@ -278,14 +278,10 @@
<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__.ProcessGSettingsGet">ProcessGSettingsGet() (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>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessLoggerGet">ProcessLoggerGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
@ -297,10 +293,10 @@
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</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>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -134,15 +134,10 @@ Work with activity scheduling.
| Orchestrator session save in file _SessionLast_RDPList.json (encoding = “utf-8”)
|
| `ProcessDefIntervalCall`(inDef, inIntervalSecFloat)
| `ProcessDefIntervalCall`(inGSettings, inDef, …)
| Use this procedure if you need to run periodically some def.
|
| `ProcessGSettingsGet`()
| Return GSettings (singleton) from global variable
|
| `ProcessIsStarted`(inProcessNameWOExeStr)
@ -153,11 +148,6 @@ Work with activity scheduling.
| Return process list on the orchestrator machine sorted by Memory Usage.
|
| `ProcessLoggerGet`()
| Return Logger from global variable
|
| `ProcessStart`(inPathStr, inArgList[, …])
@ -725,13 +715,16 @@ 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)
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall(inGSettings, inDef, inIntervalSecFloat, inIntervalAsyncBool=False, inDefArgList=None, inDefArgDict=None, inDefArgGSettingsNameStr=None, inDefArgLoggerNameStr=None, inExecuteInNewThreadBool=True, inLogger=None)
Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :)
* **Parameters**
* **inGSettings** global settings
* **inDef** def link, which will be called with interval inIntervalSecFloat
@ -747,17 +740,17 @@ Use this procedure if you need to run periodically some def. Set def, args, inte
* **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
* **inDefArgGSettingsNameStr** Name of the GSettings arg name for def (optional)
* **inDefArgLoggerNameStr** Name of the Logger arg name for def (optional). If Use - please check fill of the inLogger arg.
* **Returns**
* **inExecuteInNewThreadBool** True - create new thread for the periodic execution; False - execute in current thread. Default: True
* **inLogger** logging def if some case is appear
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessGSettingsGet()
Return GSettings (singleton) from global variable
* **Returns**
@ -830,15 +823,6 @@ lProcessList = Orchestrator.ProcessListGet()
> {…}]
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessLoggerGet()
Return Logger from global variable
* **Returns**
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart(inPathStr, inArgList, inStopProcessNameWOExeStr=None)
Start process locally. Extra feature: Use inStopProcessNameWOExeStr to stop the execution if current process is running.

Loading…
Cancel
Save