diff --git a/distributed/deploy/cluster.py b/distributed/deploy/cluster.py index 13e81f5f82d..d2d0da82ae1 100644 --- a/distributed/deploy/cluster.py +++ b/distributed/deploy/cluster.py @@ -427,10 +427,13 @@ def update(): cluster_repr_interval = parse_timedelta( dask.config.get("distributed.deploy.cluster-repr-interval", default="ms") ) - pc = PeriodicCallback(update, cluster_repr_interval * 1000) - self.periodic_callbacks["cluster-repr"] = pc - pc.start() + def install(): + pc = PeriodicCallback(update, cluster_repr_interval * 1000) + self.periodic_callbacks["cluster-repr"] = pc + pc.start() + + self.loop.add_callback(install) return tab def _repr_html_(self, cluster_status=None):