Skip to content

Commit 8eb81d2

Browse files
Merge pull request #79 from jacobtomlinson/optional_scheduler_ip
Only add scheduler_ip to opts if it has been set
2 parents ccacb62 + 6fe8c28 commit 8eb81d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dask_mpi/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ async def run_worker():
131131
)
132132
WorkerType = Worker
133133
opts = {
134-
"scheduler_ip": scheduler_address,
135134
"interface": interface,
136135
"protocol": protocol,
137136
"nthreads": nthreads,
@@ -141,6 +140,8 @@ async def run_worker():
141140
"scheduler_file": scheduler_file,
142141
**worker_options,
143142
}
143+
if scheduler_address:
144+
opts["scheduler_ip"] = scheduler_address
144145
async with WorkerType(**opts) as worker:
145146
await worker.finished()
146147

0 commit comments

Comments
 (0)