def test_worker_table(s, a, b): while any('last-seen' not in v for v in s.host_info.values()): yield gen.sleep(0.01) data = workers(s) source, plot = worker_table_plot() worker_table_update(source, data) assert source.data['host'] == ['127.0.0.1']
def test_worker_table(s, a, b): while any("last-seen" not in v for v in s.host_info.values()): yield gen.sleep(0.01) data = workers(s) source, plot = worker_table_plot() worker_table_update(source, data) assert source.data["host"] == ["127.0.0.1"]
dask_dir = os.path.join(os.path.expanduser('~'), '.dask') options_path = os.path.join(dask_dir, '.dask-web-ui.json') if os.path.exists(options_path): with open(options_path, 'r') as f: options = json.load(f) else: options = {'host': '127.0.0.1', 'tcp-port': 8786, 'http-port': 9786} scheduler = rpc(ip=options['host'], port=options['tcp-port']) worker_source, [mem, table] = worker_table_plot(width=WIDTH) def worker_update(): with log_errors(): try: msg = messages['workers']['deque'][-1] except IndexError: return worker_table_update(worker_source, msg) doc.add_periodic_callback(worker_update, messages['workers']['interval']) """ def f(_, old, new): host = worker_source.data['host'] hosts = [host[i] for i in new['1d']['indices']]