用法:
unregister_worker_plugin(name, nanny=None)取消注冊生命周期工作插件
這將取消注冊現有的工作插件。作為注銷過程的一部分,插件的
teardown方法將被調用。- name:str
要注銷的插件的名稱。有關詳細信息,請參閱
Client.register_worker_plugin()文檔字符串。
參數:
例子:
>>> class MyPlugin(WorkerPlugin): ... def __init__(self, *args, **kwargs): ... pass # the constructor is up to you ... def setup(self, worker: dask.distributed.Worker): ... pass ... def teardown(self, worker: dask.distributed.Worker): ... pass ... def transition(self, key: str, start: str, finish: str, **kwargs): ... pass ... def release_key(self, key: str, state: str, cause: str | None, reason: None, report: bool): ... pass>>> plugin = MyPlugin(1, 2, 3) >>> client.register_worker_plugin(plugin, name='foo') >>> client.unregister_worker_plugin(name='foo')
相關用法
- Python distributed.Client.unpublish_dataset用法及代碼示例
- Python distributed.Client.upload_file用法及代碼示例
- Python distributed.Client.gather用法及代碼示例
- Python distributed.Client.ncores用法及代碼示例
- Python distributed.Client.retire_workers用法及代碼示例
- Python distributed.Client.set_metadata用法及代碼示例
- Python distributed.Client.scheduler_info用法及代碼示例
- Python distributed.Client.submit用法及代碼示例
- Python distributed.Client.compute用法及代碼示例
- Python distributed.Client.nthreads用法及代碼示例
- Python distributed.Client.start_ipython_scheduler用法及代碼示例
- Python distributed.Client.get用法及代碼示例
- Python distributed.Client.publish_dataset用法及代碼示例
- Python distributed.Client.who_has用法及代碼示例
- Python distributed.Client.get_versions用法及代碼示例
- Python distributed.Client.profile用法及代碼示例
- Python distributed.Client.run用法及代碼示例
- Python distributed.Client.register_worker_plugin用法及代碼示例
- Python distributed.Client.map用法及代碼示例
- Python distributed.Client.log_event用法及代碼示例
注:本文由純淨天空篩選整理自dask.org大神的英文原創作品 distributed.Client.unregister_worker_plugin。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
