Skip to content

Commit

Permalink
fix ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Kopylov committed Feb 6, 2024
1 parent 857ac4c commit 9db18cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To host your own instance of the bot, follow these steps:
```dotenv
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
DEVELOPER_CHAT_ID=your_chat_id_for_getting_logs_and_errors# optional
SQLITE_DB_FILE_PATH=database/db.sqlite# or any other path that you prefer
SQLITE_DB_FILE_PATH=db.sqlite# or any other path that you prefer
```

Please note that you need to create a new bot using the [BotFather](https://t.me/BotFather) and get the token for
Expand Down
9 changes: 4 additions & 5 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
from src.db import close_db
from src.get_handlers import get_handlers

logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
)
logger = logging.getLogger()


def main() -> None:
if not config.TELEGRAM_BOT_TOKEN:
Expand All @@ -38,6 +33,10 @@ def main() -> None:
try:
main()
except Exception:
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
)
logger = logging.getLogger()
logger.warning(traceback.format_exc())
finally:
close_db()
2 changes: 1 addition & 1 deletion src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Database constants
SQLITE_DB_FILE_PATH = os.getenv(
"SQLITE_DB_FILE_PATH", Path().resolve() / "database/db.sqlite"
"SQLITE_DB_FILE_PATH", Path().resolve() / "db.sqlite"
)
DATE_FORMAT = "%d.%m.%Y %H:%M:%S"

Expand Down

0 comments on commit 9db18cb

Please sign in to comment.