用法:
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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。