Deployment communication.
This commit is contained in:
		
							parent
							
								
									f5e807cdbf
								
							
						
					
					
						commit
						b82db127ae
					
				@ -156,7 +156,14 @@ class ComposeFileManager:
 | 
			
		||||
        )
 | 
			
		||||
        if name in self.running_instances:
 | 
			
		||||
            del self.running_instances[name]
 | 
			
		||||
        stdout, stderr = None, None
 | 
			
		||||
        while proc.returncode is None:
 | 
			
		||||
            try:
 | 
			
		||||
                stdout, stderr = await proc.communicate()
 | 
			
		||||
            except Exception as ex:
 | 
			
		||||
                stdout = b''
 | 
			
		||||
                stderr = str(ex).encode()
 | 
			
		||||
            await self.event_handler(name,"stdout",stdout or stderr)
 | 
			
		||||
        if proc.returncode != 0:
 | 
			
		||||
            raise RuntimeError(f"Failed to stop {name}: {stderr.decode()}")
 | 
			
		||||
        if stdout:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user