mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 00:52:55 +00:00 
			
		
		
		
	Refactor deploy handler
This commit is contained in:
		
				
					committed by
					
						
						therealkrispet
					
				
			
			
				
	
			
			
			
						parent
						
							c5afdfb1b2
						
					
				
				
					commit
					7a14928432
				
			@@ -1,3 +1,8 @@
 | 
			
		||||
import logging
 | 
			
		||||
 | 
			
		||||
LOG = logging.getLogger(__name__)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DeployHandler:
 | 
			
		||||
    keys = ['deploy.start', 'process.restart']
 | 
			
		||||
 | 
			
		||||
@@ -22,8 +27,7 @@ class DeployHandler:
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
    def handle_process(self, message):
 | 
			
		||||
            self.connector.send_message({
 | 
			
		||||
                'key': 'deploy.finish',
 | 
			
		||||
                'status': 'success' if 'error' not in message else 'error'
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
        response = {'key': 'deploy.finish'}
 | 
			
		||||
        if 'error' in message:
 | 
			
		||||
            response['error'] = message['error']
 | 
			
		||||
        self.connector.send_message(response)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user