use db contexts for better stability
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -2,12 +2,14 @@ import os
 | 
			
		||||
from telegram.ext import Application
 | 
			
		||||
import logging
 | 
			
		||||
 | 
			
		||||
from commands import journal #, status
 | 
			
		||||
from commands import journal, status
 | 
			
		||||
from commands.list import list
 | 
			
		||||
import models
 | 
			
		||||
 | 
			
		||||
logging.basicConfig(
 | 
			
		||||
    format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
 | 
			
		||||
    format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
 | 
			
		||||
    # level=logging.INFO
 | 
			
		||||
    level=logging.DEBUG
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
logger = logging.getLogger(__name__)
 | 
			
		||||
@@ -24,7 +26,7 @@ def main() -> None:
 | 
			
		||||
 | 
			
		||||
    application.add_handler(journal.JournalHandler("journal", models).handler)
 | 
			
		||||
    application.add_handler(list.ListHandler("list", models).handler)
 | 
			
		||||
    # application.add_handler(status.StatusHandlerl("status", models).handler)
 | 
			
		||||
    application.add_handler(status.StatusHandler("status", models).handler)
 | 
			
		||||
    # application.add_handler(CommandHandler("help", help_command))
 | 
			
		||||
    # on non command i.e message - echo the message on Telegram
 | 
			
		||||
    # application.add_handler(InlineQueryHandler(inline_query))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user