New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to override python used to start workers #167

Merged
merged 2 commits into from Oct 5, 2018

Conversation

Projects
None yet
3 participants
@ocaisa
Copy link
Contributor

ocaisa commented Oct 5, 2018

fixes #166

@@ -195,6 +198,8 @@ def __init__(self,
extra = dask.config.get('jobqueue.%s.extra' % self.scheduler_name)
if env_extra is None:
env_extra = dask.config.get('jobqueue.%s.env-extra' % self.scheduler_name)
if python is None:
python = sys.executable

This comment has been minimized.

@mrocklin

mrocklin Oct 5, 2018

Member

I think that we can safely include this directly in the signature. It's not going to change.

This comment has been minimized.

@guillaumeeb

guillaumeeb Oct 5, 2018

Member

So this means no config entry?

This comment has been minimized.

@mrocklin

mrocklin Oct 5, 2018

Member

Right. If we were to include this as part of the config (which I don't think is necessary) then we would want to check the default every time we called the constructor here, so we would need this check to be within the constuctor as you have it here. However if the default value is just going to be sys.executable (which I think is best today) then we can include it as a default directly in the signature of the constructor. This is a bit better both because it reduces code, and because it makes the default visible if people look at the docstring.

cancel_command: str
Abstract attribute for job scheduler cancel command,
should be overriden
should be overridden

This comment has been minimized.

@mrocklin

mrocklin Oct 5, 2018

Member

Thanks for correcting these typos

@mrocklin

This comment has been minimized.

Copy link
Member

mrocklin commented Oct 5, 2018

One small comment. Otherwise this looks good to me. Thanks @ocaisa

@mrocklin mrocklin merged commit 3204da4 into dask:master Oct 5, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ocaisa ocaisa deleted the ocaisa:python_kw_arg branch Oct 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment