File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ The list of contributors in alphabetical order:
2525-  [ Sinclert Perez] ( https://www.linkedin.com/in/sinclert ) 
2626-  [ Tibor Simko] ( https://orcid.org/0000-0001-7202-5803 ) 
2727-  [ Vladyslav Moisieienkov] ( https://orcid.org/0000-0001-9717-0775 ) 
28+ -  [ Xavier Tintin] ( https://orcid.org/0000-0002-3150-9112 ) 
Original file line number Diff line number Diff line change 177177SLURM_SSH_AUTH_TIMEOUT  =  float (os .getenv ("SLURM_SSH_AUTH_TIMEOUT" , "60" ))
178178"""Seconds to wait for SLURM SSH authentication response.""" 
179179
180+ USE_KUEUE  =  bool (strtobool (os .getenv ("USE_KUEUE" , "False" )))
181+ """Whether to use Kueue to manage job execution.""" 
182+ 
183+ KUEUE_LOCAL_QUEUE_NAME  =  "local-queue-job" 
184+ """Name of the local queue to be used by Kueue.""" 
185+ 
180186REANA_USER_ID  =  os .getenv ("REANA_USER_ID" )
181187"""User UUID of the owner of the workflow.""" 
182188
Original file line number Diff line number Diff line change 5252    REANA_KUBERNETES_JOBS_MEMORY_LIMIT ,
5353    REANA_KUBERNETES_JOBS_MAX_USER_MEMORY_LIMIT ,
5454    REANA_USER_ID ,
55+     USE_KUEUE ,
56+     KUEUE_LOCAL_QUEUE_NAME ,
5557)
5658from  reana_job_controller .errors  import  ComputingBackendSubmissionError 
5759from  reana_job_controller .job_manager  import  JobManager 
@@ -155,12 +157,16 @@ def secrets(self):
155157    def  execute (self ):
156158        """Execute a job in Kubernetes.""" 
157159        backend_job_id  =  build_unique_component_name ("run-job" )
160+ 
158161        self .job  =  {
159162            "kind" : "Job" ,
160163            "apiVersion" : "batch/v1" ,
161164            "metadata" : {
162165                "name" : backend_job_id ,
163166                "namespace" : REANA_RUNTIME_KUBERNETES_NAMESPACE ,
167+                 "labels" : (
168+                     {"kueue.x-k8s.io/queue-name" : KUEUE_LOCAL_QUEUE_NAME } if  USE_KUEUE  else  {}
169+                 ),
164170            },
165171            "spec" : {
166172                "backoffLimit" : KubernetesJobManager .MAX_NUM_JOB_RESTARTS ,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments