Skip to content

Commit 7fbaee7

Browse files
committed
Update comments on #141 for clarity
1 parent ad6b010 commit 7fbaee7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

batchspawner/batchspawner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def parse_job_id(self, output):
187187
return output
188188

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

192193
@gen.coroutine
@@ -230,8 +231,11 @@ def _get_batch_script(self, **subvars):
230231
@gen.coroutine
231232
def submit_batch_script(self):
232233
subvars = self.get_req_subvars()
234+
# `cmd` is submitted to the batch system
233235
cmd = ' '.join((format_template(self.exec_prefix, **subvars),
234236
format_template(self.batch_submit_cmd, **subvars)))
237+
# `subvars['cmd']` is what is run _inside_ the batch script,
238+
# put into the template.
235239
subvars['cmd'] = self.cmd_formatted_for_batch()
236240
if hasattr(self, 'user_options'):
237241
subvars.update(self.user_options)

0 commit comments

Comments
 (0)