Skip to content

Commit 359d1e8

Browse files
committed
remote port selection: separate wrapper into separate traitlet
- Needed in cases where path to the wrapper may need explicit specification.
1 parent 7fbaee7 commit 359d1e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

batchspawner/batchspawner.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ def _req_keepvars_default(self):
156156
"Must include {cmd} which will be replaced with the jupyterhub-singleuser command line."
157157
).tag(config=True)
158158

159+
batchspawner_wrapper = Unicode('batchspawner-singleuser',
160+
help="A wrapper which is capable of special batchspawner setup: currently sets the port on "
161+
"the remote host. Not needed to be set under normal circumstances, unless path needs "
162+
"specification."
163+
).tag(config=True)
164+
159165
# Raw output of job submission command unless overridden
160166
job_id = Unicode()
161167

@@ -188,7 +194,7 @@ def parse_job_id(self, output):
188194

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

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

0 commit comments

Comments
 (0)