fixed for env

pull/231/head
Yariv Menachem 2025-01-05 11:16:24 +02:00
parent fe3ee7c4d8
commit 3c091b846d
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ if not os.path.exists(dotenv_file):
class Settings(BaseSettings): class Settings(BaseSettings):
environment: str env: str
telegram_api_token: str telegram_api_token: str
mongo_uri: str mongo_uri: str
mongo_db_name: str mongo_db_name: str

View File

@ -3,13 +3,14 @@ import os
from telegram import Update from telegram import Update
from telegram.ext import Application, CommandHandler, CallbackQueryHandler, Updater from telegram.ext import Application, CommandHandler, CallbackQueryHandler, Updater
from config.settings import settings
from jobspy.scrapers.site import Site from jobspy.scrapers.site import Site
from jobspy.scrapers.utils import create_logger from jobspy.scrapers.utils import create_logger
from telegram_handler import TelegramDefaultHandler from telegram_handler import TelegramDefaultHandler
from telegram_handler.button_callback.telegram_callback_handler import TelegramCallHandler from telegram_handler.button_callback.telegram_callback_handler import TelegramCallHandler
logger = create_logger("Main") logger = create_logger("Main")
_api_token = os.getenv("TELEGRAM_API_TOKEN") _api_token = settings.telegram_api_token
application = Application.builder().token(_api_token).build() application = Application.builder().token(_api_token).build()
title_filters: list[str] = ["test", "qa", "Lead", "Full-Stack", "Full Stack", "Fullstack", "Frontend", "Front-end", title_filters: list[str] = ["test", "qa", "Lead", "Full-Stack", "Full Stack", "Fullstack", "Frontend", "Front-end",
"Front End", "DevOps", "Physical", "Staff", "Front End", "DevOps", "Physical", "Staff",