mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Close db connection at end
This commit is contained in:
		@@ -34,10 +34,11 @@ class DatabaseInterface(object):
 | 
				
			|||||||
        session = Session()
 | 
					        session = Session()
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            yield session
 | 
					            yield session
 | 
				
			||||||
 | 
					            session.commit()
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            session.rollback()
 | 
					            session.rollback()
 | 
				
			||||||
        finally:
 | 
					        finally:
 | 
				
			||||||
            session.commit()
 | 
					            session.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async def push_message(self, message):
 | 
					    async def push_message(self, message):
 | 
				
			||||||
        if message.guild:
 | 
					        if message.guild:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user