Transactions.
This commit is contained in:
		
							parent
							
								
									9d5815ed10
								
							
						
					
					
						commit
						8810679fd8
					
				| @ -81,10 +81,12 @@ class Application(BaseApplication): | ||||
|     async def task_runner(self): | ||||
|         while True: | ||||
|             task = await self.tasks.get()  | ||||
|             self.db.begin() | ||||
|             try: | ||||
|                 await task | ||||
|             except Exception as ex: | ||||
|                 print(ex) | ||||
|             self.db.commit() | ||||
| 
 | ||||
|     async def prepare_database(self,app): | ||||
|         self.db.query("PRAGMA journal_mode=WAL") | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user