Skip to content

Commit

Permalink
Rename JobQueueCluster cluster attribute to local_cluster. (#79)
Browse files Browse the repository at this point in the history
This avoids client.cluster.cluster which is a bit confusing.
  • Loading branch information
lesteve committed Jun 29, 2018
1 parent d1cd730 commit a409f7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dask_jobqueue/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__(self,
else:
host = socket.gethostname()

self.cluster = LocalCluster(n_workers=0, ip=host, **kwargs)
self.local_cluster = LocalCluster(n_workers=0, ip=host, **kwargs)

# Keep information on process, threads and memory, for use in
# subclasses
Expand Down Expand Up @@ -191,7 +191,7 @@ def start_workers(self, n=1):
@property
def scheduler(self):
""" The scheduler of this cluster """
return self.cluster.scheduler
return self.local_cluster.scheduler

def _calls(self, cmds):
""" Call a command using subprocess.communicate
Expand Down Expand Up @@ -261,7 +261,7 @@ def __enter__(self):

def __exit__(self, type, value, traceback):
self.stop_workers(self.jobs)
self.cluster.__exit__(type, value, traceback)
self.local_cluster.__exit__(type, value, traceback)

def _job_id_from_submit_output(self, out):
raise NotImplementedError('_job_id_from_submit_output must be '
Expand Down

0 comments on commit a409f7e

Please sign in to comment.