From 0273f449b8d8c089b3f87fafe01a508307c48179 Mon Sep 17 00:00:00 2001 From: Benoit Seignovert Date: Mon, 26 Feb 2024 09:55:15 +0100 Subject: [PATCH] Add SLURM job name to the config --- src/glicid_spawner/spawner.py | 5 +++++ tests/test_spawner.py | 1 + 2 files changed, 6 insertions(+) diff --git a/src/glicid_spawner/spawner.py b/src/glicid_spawner/spawner.py index 03504ad..d6aea5f 100644 --- a/src/glicid_spawner/spawner.py +++ b/src/glicid_spawner/spawner.py @@ -18,6 +18,11 @@ class GlicidSpawner(SlurmSpawner): help='Spawner singleuser command.', ).tag(config=True) + req_job_name = Unicode( + 'jupyterhub_glicid', + help='SLURM job name', + ).tag(config=True) + req_qos = Unicode( 'short', help='QoS name to submit job to resource manager', diff --git a/tests/test_spawner.py b/tests/test_spawner.py index e45b128..ba0ceaf 100644 --- a/tests/test_spawner.py +++ b/tests/test_spawner.py @@ -21,6 +21,7 @@ def test_spawner_config(): assert spawner.batchspawner_singleuser_cmd == 'glicid-spawner-singleuser' + assert spawner.req_job_name == 'jupyterhub_glicid' assert spawner.req_qos == 'short' assert spawner.progress_rate == 10