Skip to content

Commit

Permalink
remote port selection: separate wrapper into separate traitlet
Browse files Browse the repository at this point in the history
- Needed in cases where path to the wrapper may need explicit
  specification.
  • Loading branch information
rkdarst committed Jun 17, 2019
1 parent 7fbaee7 commit 359d1e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion batchspawner/batchspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ def _req_keepvars_default(self):
"Must include {cmd} which will be replaced with the jupyterhub-singleuser command line."
).tag(config=True)

batchspawner_wrapper = Unicode('batchspawner-singleuser',
help="A wrapper which is capable of special batchspawner setup: currently sets the port on "
"the remote host. Not needed to be set under normal circumstances, unless path needs "
"specification."
).tag(config=True)

# Raw output of job submission command unless overridden
job_id = Unicode()

Expand Down Expand Up @@ -188,7 +194,7 @@ def parse_job_id(self, output):

def cmd_formatted_for_batch(self):
"""The command which is substituted inside of the batch script"""
return ' '.join(['batchspawner-singleuser'] + self.cmd + self.get_args())
return ' '.join(self.batchspawner_wrapper + self.cmd + self.get_args())

@gen.coroutine
def run_command(self, cmd, input=None, env=None):
Expand Down

0 comments on commit 359d1e8

Please sign in to comment.