mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-11-04 10:34:05 +00:00 
			
		
		
		
	run-autopkgtest: put requests into appropriate per-context AMQP queue
This commit is contained in:
		
							parent
							
								
									f4fd77c9ed
								
							
						
					
					
						commit
						d0337785d8
					
				@ -101,19 +101,24 @@ if __name__ == '__main__':
 | 
				
			|||||||
    if not args.architecture:
 | 
					    if not args.architecture:
 | 
				
			||||||
        args.architecture = config.adt_arches.split()
 | 
					        args.architecture = config.adt_arches.split()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    context = ''
 | 
				
			||||||
    params = {}
 | 
					    params = {}
 | 
				
			||||||
    if args.trigger:
 | 
					    if args.trigger:
 | 
				
			||||||
        params['triggers'] = args.trigger
 | 
					        params['triggers'] = args.trigger
 | 
				
			||||||
    if args.ppa:
 | 
					    if args.ppa:
 | 
				
			||||||
        params['ppas'] = args.ppa
 | 
					        params['ppas'] = args.ppa
 | 
				
			||||||
 | 
					        context = 'ppa-'
 | 
				
			||||||
    if args.env:
 | 
					    if args.env:
 | 
				
			||||||
        params['env'] = args.env
 | 
					        params['env'] = args.env
 | 
				
			||||||
    if args.test_git:
 | 
					    if args.test_git:
 | 
				
			||||||
        params['test-git'] = args.test_git
 | 
					        params['test-git'] = args.test_git
 | 
				
			||||||
 | 
					        context = 'upstream-'
 | 
				
			||||||
    elif args.build_git:
 | 
					    elif args.build_git:
 | 
				
			||||||
        params['build-git'] = args.build_git
 | 
					        params['build-git'] = args.build_git
 | 
				
			||||||
 | 
					        context = 'upstream-'
 | 
				
			||||||
    if args.test_bzr:
 | 
					    if args.test_bzr:
 | 
				
			||||||
        params['test-bzr'] = args.test_bzr
 | 
					        params['test-bzr'] = args.test_bzr
 | 
				
			||||||
 | 
					        context = 'upstream-'
 | 
				
			||||||
    if args.all_proposed:
 | 
					    if args.all_proposed:
 | 
				
			||||||
        params['all-proposed'] = True
 | 
					        params['all-proposed'] = True
 | 
				
			||||||
    params = '\n' + json.dumps(params)
 | 
					    params = '\n' + json.dumps(params)
 | 
				
			||||||
@ -125,7 +130,7 @@ if __name__ == '__main__':
 | 
				
			|||||||
                         password=creds.password) as amqp_con:
 | 
					                         password=creds.password) as amqp_con:
 | 
				
			||||||
        with amqp_con.channel() as ch:
 | 
					        with amqp_con.channel() as ch:
 | 
				
			||||||
            for arch in args.architecture:
 | 
					            for arch in args.architecture:
 | 
				
			||||||
                queue = 'debci-%s-%s' % (args.series, arch)
 | 
					                queue = 'debci-%s%s-%s' % (context, args.series, arch)
 | 
				
			||||||
                for pkg in args.package:
 | 
					                for pkg in args.package:
 | 
				
			||||||
                    ch.basic_publish(amqp.Message(pkg + params),
 | 
					                    ch.basic_publish(amqp.Message(pkg + params),
 | 
				
			||||||
                                     routing_key=queue)
 | 
					                                     routing_key=queue)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user