mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-15 06:14:25 +08:00
12 lines
6.2 KiB
JavaScript
12 lines
6.2 KiB
JavaScript
import{_ as e,o as a,c as n,e as t}from"./app-0e_4pVFu.js";const s={},r=t(`<h3 id="class-channeldeliver" tabindex="-1"><a class="header-anchor" href="#class-channeldeliver"><span><em><strong>class</strong></em> <code>ChannelDeliver</code></span></a></h3><h3 id="class-processmanager" tabindex="-1"><a class="header-anchor" href="#class-processmanager"><span><em><strong>class</strong></em> <code>ProcessManager</code></span></a></h3><p>进程管理器</p><h3 id="def-start-self-any-name-str-none" tabindex="-1"><a class="header-anchor" href="#def-start-self-any-name-str-none"><span> <em><strong>def</strong></em> <code>start(self: Any, name: str) -> None</code></span></a></h3><p> 开启后自动监控进程,并添加到进程字典中</p><p>Args:</p><pre><code>name:
|
||
</code></pre><p>Returns:</p><h3 id="def-start-all-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-start-all-self-any-none"><span> <em><strong>def</strong></em> <code>start_all(self: Any) -> None</code></span></a></h3><p> 启动所有进程</p><h3 id="def-add-target-self-any-name-str-target-target-func-args-tuple-kwargs-any-none" tabindex="-1"><a class="header-anchor" href="#def-add-target-self-any-name-str-target-target-func-args-tuple-kwargs-any-none"><span> <em><strong>def</strong></em> <code>add_target(self: Any, name: str, target: TARGET_FUNC, args: tuple, kwargs: Any) -> None</code></span></a></h3><p> 添加进程</p><p>Args:</p><pre><code>name: 进程名,用于获取和唯一标识
|
||
|
||
target: 进程函数
|
||
|
||
args: 进程函数参数
|
||
|
||
kwargs: 进程函数关键字参数,通常会默认传入chan_active和chan_passive
|
||
</code></pre><h3 id="def-join-all-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-join-all-self-any-none"><span> <em><strong>def</strong></em> <code>join_all(self: Any) -> None</code></span></a></h3><p> </p><h3 id="def-terminate-self-any-name-str-none" tabindex="-1"><a class="header-anchor" href="#def-terminate-self-any-name-str-none"><span> <em><strong>def</strong></em> <code>terminate(self: Any, name: str) -> None</code></span></a></h3><p> 终止进程并从进程字典中删除</p><p>Args:</p><pre><code>name:
|
||
</code></pre><p>Returns:</p><h3 id="def-terminate-all-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-terminate-all-self-any-none"><span> <em><strong>def</strong></em> <code>terminate_all(self: Any) -> None</code></span></a></h3><p> </p><h3 id="def-is-process-alive-self-any-name-str-bool" tabindex="-1"><a class="header-anchor" href="#def-is-process-alive-self-any-name-str-bool"><span> <em><strong>def</strong></em> <code>is_process_alive(self: Any, name: str) -> bool</code></span></a></h3><p> 检查进程是否存活</p><p>Args:</p><pre><code>name:
|
||
</code></pre><p>Returns:</p>`,28),l=[r];function o(d,i){return a(),n("div",null,l)}const f=e(s,[["render",o],["__file","manager.html.vue"]]),p=JSON.parse('{"path":"/en/dev/api/liteyuki/core/manager.html","title":"liteyuki.core.manager","lang":"en-US","frontmatter":{"title":"liteyuki.core.manager","order":1,"icon":"laptop-code","category":"API","description":"class ChannelDeliver class ProcessManager 进程管理器 def start(self: Any, name: str) -> None 开启后自动监控进程,并添加到进程字典中 Args: Returns: def start_all(self: Any) -> None 启动所有进程 def add_target...","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/liteyuki/core/manager.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.core.manager"}],["meta",{"property":"og:description","content":"class ChannelDeliver class ProcessManager 进程管理器 def start(self: Any, name: str) -> None 开启后自动监控进程,并添加到进程字典中 Args: Returns: def start_all(self: Any) -> None 启动所有进程 def add_target..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:55:47.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:55:47.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core.manager\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:55:47.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class ChannelDeliver","slug":"class-channeldeliver","link":"#class-channeldeliver","children":[]},{"level":3,"title":"class ProcessManager","slug":"class-processmanager","link":"#class-processmanager","children":[]},{"level":3,"title":"def start(self: Any, name: str) -> None","slug":"def-start-self-any-name-str-none","link":"#def-start-self-any-name-str-none","children":[]},{"level":3,"title":"def start_all(self: Any) -> None","slug":"def-start-all-self-any-none","link":"#def-start-all-self-any-none","children":[]},{"level":3,"title":"def add_target(self: Any, name: str, target: TARGET_FUNC, args: tuple, kwargs: Any) -> None","slug":"def-add-target-self-any-name-str-target-target-func-args-tuple-kwargs-any-none","link":"#def-add-target-self-any-name-str-target-target-func-args-tuple-kwargs-any-none","children":[]},{"level":3,"title":"def join_all(self: Any) -> None","slug":"def-join-all-self-any-none","link":"#def-join-all-self-any-none","children":[]},{"level":3,"title":"def terminate(self: Any, name: str) -> None","slug":"def-terminate-self-any-name-str-none","link":"#def-terminate-self-any-name-str-none","children":[]},{"level":3,"title":"def terminate_all(self: Any) -> None","slug":"def-terminate-all-self-any-none","link":"#def-terminate-all-self-any-none","children":[]},{"level":3,"title":"def is_process_alive(self: Any, name: str) -> bool","slug":"def-is-process-alive-self-any-name-str-bool","link":"#def-is-process-alive-self-any-name-str-bool","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724032547000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.62,"words":185},"filePathRelative":"en/dev/api/liteyuki/core/manager.md","localizedDate":"August 19, 2024","autoDesc":true}');export{f as comp,p as data};
|