Skip to content
Merged
Changes from 3 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
7 changes: 6 additions & 1 deletion distributed/deploy/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .spec import SpecCluster
from ..nanny import Nanny
from ..scheduler import Scheduler
from ..security import Security
from ..worker import Worker, parse_memory_limit

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -123,11 +124,15 @@ def __init__(

self.status = None
self.processes = processes
security = security or Security()

if protocol is None:
if host and "://" in host:
protocol = host.split("://")[0]
elif security:
elif (
security
and security.get_connection_args("scheduler")["require_encryption"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

elif security and security.require_encryption:

):
protocol = "tls://"
elif not self.processes and not scheduler_port:
protocol = "inproc://"
Expand Down