Class Nanny
A process to manage worker processes
Declaration
source linkDocumentation
The nanny spins up Worker processes, watches then, and kills or restarts
them as necessary. It is necessary if you want to use the
``Client.restart`` method, or to restart the worker automatically if
it gets to the terminate fractiom of its memory limit.
The parameters for the Nanny are mostly the same as those for the Worker.
See also
Worker
Methods
▶ def __init__(self, scheduler_ip=None, scheduler_port=None, scheduler_file=None, ...) override def __init__(
self,
scheduler_ip=None,
scheduler_port=None,
scheduler_file=None,
worker_port=0,
nthreads=None,
ncores=None,
loop=None,
local_dir=None,
local_directory=None,
services=None,
name=None,
memory_limit="auto",
reconnect=True,
validate=False,
quiet=False,
resources=None,
silence_logs=None,
death_timeout=None,
preload=None,
preload_argv=None,
preload_nanny=None,
preload_nanny_argv=None,
security=None,
contact_address=None,
listen_address=None,
worker_class=None,
env=None,
interface=None,
host=None,
port=None,
protocol=None,
config=None,
**worker_kwargs,
)
This method overrides distributed.core.Server.__init__.
▶ def close_gracefully(self, comm=None) A signal that we shouldn't try to restart workers if they go away
This is used as part of the cluster shutdown process.
▷ def local_dir(self) @property For API compatibility with Nanny
@property
def local_dir(self)
▷ def memory_monitor(self) Track worker's memory. Restart if it goes above terminate fraction
▷ def pid(self) @property ▷ def run(self, *args, **kwargs) @property
def worker_address(self)
@property
def worker_dir(self)