Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dask_jobqueue/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def __init__(
scheduler_cls=Scheduler, # Use local scheduler for now
# Options for both scheduler and workers
interface=None,
protocol="tcp://",
protocol=None,
# Job keywords
config_name=None,
**job_kwargs
Expand Down Expand Up @@ -500,6 +500,9 @@ def __init__(
"jobqueue.%s.scheduler-options" % config_name, {}
)

if protocol is None and security is not None:
protocol = "tls://"

default_scheduler_options = {
"protocol": protocol,
"dashboard_address": ":8787",
Expand Down
4 changes: 4 additions & 0 deletions dask_jobqueue/tests/test_jobqueue_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ def test_security():
assert cluster.security == security
assert cluster.scheduler_spec["options"]["security"] == security
job_script = cluster.job_script()
assert "tls://" in job_script
assert "--tls-key {}".format(key) in job_script
assert "--tls-cert {}".format(cert) in job_script
assert "--tls-ca-file {}".format(cert) in job_script
Expand All @@ -442,3 +443,6 @@ def test_security():
future = client.submit(lambda x: x + 1, 10)
result = future.result()
assert result == 11

with LocalCluster(cores=1, memory="1GB", security=security) as cluster:
assert "tls://" in job_script