def enable_node(self, ip_addr, *setup_args):
"""If computation disabled nodes (with 'disabled_nodes=True' when
Computation is constructed), nodes are not automatically used by the
scheduler until nodes are enabled with 'enable_node'.
'ip_addr' must be either IP address or host name of the node to be
enabled.
'setup_args' is arguments passed to 'node_setup' function specific to
that node. If 'node_setup' succeeds (i.e., finishes with value 0), the
node is used for computations.
"""
if self.scheduler:
if isinstance(ip_addr, pycos.Location):
ip_addr = ip_addr.addr
self.scheduler.send({'req': 'enable_node', 'auth': self._auth, 'addr': ip_addr,
'setup_args': setup_args})
评论列表
文章目录