mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	purge-old-deployments: Never purge the currently running deployment.
(imported from commit edccfc908f50a66e5c214bca8a5418625ed64bf0)
This commit is contained in:
		@@ -17,6 +17,10 @@ for filename in os.listdir(DEPLOYMENTS_DIR):
 | 
			
		||||
    try:
 | 
			
		||||
        date = datetime.datetime.strptime(filename, TIMESTAMP_FORMAT)
 | 
			
		||||
        if date < one_week_ago:
 | 
			
		||||
            if (os.path.abspath(os.readlink("/home/zulip/deployments/current")) ==
 | 
			
		||||
                os.path.abspath(os.path.join(DEPLOYMENTS_DIR, filename))):
 | 
			
		||||
                # Never purge the currently running deployment
 | 
			
		||||
                continue
 | 
			
		||||
            to_purge.append(filename)
 | 
			
		||||
    except ValueError:
 | 
			
		||||
        pass
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user