Skip to content

Commit 9165b0e

Browse files
committed
RF: consistency for SlurmSpawner - removed dated __doc__ and placed batch_script first
1 parent 05a747e commit 9165b0e

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

batchspawner/batchspawner.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -505,22 +505,6 @@ def get_env(self):
505505

506506

507507
class SlurmSpawner(UserEnvMixin,BatchSpawnerRegexStates):
508-
"""A Spawner that just uses Popen to start local processes."""
509-
510-
# all these req_foo traits will be available as substvars for templated strings
511-
req_cluster = Unicode('', \
512-
help="Cluster name to submit job to resource manager"
513-
).tag(config=True)
514-
515-
req_qos = Unicode('', \
516-
help="QoS name to submit job to resource manager"
517-
).tag(config=True)
518-
519-
req_srun = Unicode('srun',
520-
help="Job step wrapper, default 'srun'. Set to '' you do not want "
521-
"to run in job step (affects environment handling)"
522-
).tag(config=True)
523-
524508
batch_script = Unicode("""#!/bin/bash
525509
#SBATCH --output={{homedir}}/jupyterhub_slurmspawner_%j.log
526510
#SBATCH --job-name=spawner-jupyterhub
@@ -540,6 +524,21 @@ class SlurmSpawner(UserEnvMixin,BatchSpawnerRegexStates):
540524
echo "jupyterhub-singleuser ended gracefully"
541525
{{epilogue}}
542526
""").tag(config=True)
527+
528+
# all these req_foo traits will be available as substvars for templated strings
529+
req_cluster = Unicode('', \
530+
help="Cluster name to submit job to resource manager"
531+
).tag(config=True)
532+
533+
req_qos = Unicode('', \
534+
help="QoS name to submit job to resource manager"
535+
).tag(config=True)
536+
537+
req_srun = Unicode('srun',
538+
help="Job step wrapper, default 'srun'. Set to '' you do not want "
539+
"to run in job step (affects environment handling)"
540+
).tag(config=True)
541+
543542
# outputs line like "Submitted batch job 209"
544543
batch_submit_cmd = Unicode('sbatch --parsable').tag(config=True)
545544
# outputs status and exec node like "RUNNING hostname"

0 commit comments

Comments
 (0)