File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,17 @@ def trigger_sync_versions(project):
118118            project_slug = version .project .slug ,
119119            version_slug = version .slug ,
120120        )
121+ 
122+         options  =  {}
123+         # Use custom queue if defined, as some repositories need to 
124+         # be synced from a specific queue (like IP restricted ones). 
125+         if  project .build_queue :
126+             options ["queue" ] =  project .build_queue 
127+ 
121128        sync_repository_task .apply_async (
122129            args = [version .pk ],
123130            kwargs = {"build_api_key" : build_api_key },
131+             ** options ,
124132        )
125133        return  version .slug 
126134    except  Exception :
Original file line number Diff line number Diff line change @@ -2032,7 +2032,7 @@ def test_sync_repository_custom_project_queue(
20322032        self , sync_repository_task , trigger_build 
20332033    ):
20342034        """ 
2035-         Check that the custom queue isn't  used for sync_repository_task. 
2035+         Check that the custom queue is  used for sync_repository_task. 
20362036        """ 
20372037        client  =  APIClient ()
20382038        self .project .build_queue  =  "specific-build-queue" 
@@ -2064,7 +2064,7 @@ def test_sync_repository_custom_project_queue(
20642064            kwargs = {
20652065                "build_api_key" : mock .ANY ,
20662066            },
2067-             # No  queue
2067+             queue = "specific-build-queue" , 
20682068        )
20692069
20702070    def  test_github_webhook_for_branches (self , trigger_build ):
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments