Transactions.
This commit is contained in:
		
							parent
							
								
									bd5bb5ae65
								
							
						
					
					
						commit
						13ce09a5c5
					
				@ -203,7 +203,9 @@ class RPCView(BaseView):
 | 
				
			|||||||
            if msg.type == web.WSMsgType.TEXT:
 | 
					            if msg.type == web.WSMsgType.TEXT:
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    async with Profiler():
 | 
					                    async with Profiler():
 | 
				
			||||||
 | 
					                        self.app.db.begin()
 | 
				
			||||||
                        await rpc(msg.json())
 | 
					                        await rpc(msg.json())
 | 
				
			||||||
 | 
					                        self.app.db.commit()
 | 
				
			||||||
                except Exception as ex:
 | 
					                except Exception as ex:
 | 
				
			||||||
                    print(ex, flush=True)
 | 
					                    print(ex, flush=True)
 | 
				
			||||||
                    await self.services.socket.delete(ws)
 | 
					                    await self.services.socket.delete(ws)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user