Skip to content

Commit 72d78b0

Browse files
committed
환경 변수에서 Telegram 채널 ID 및 토큰을 로드하도록 변경
1 parent cfde7f3 commit 72d78b0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

hankyungconsen.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@
1212

1313
load_dotenv()
1414

15-
from models.SecretKey import SecretKey
16-
17-
SECRET_KEY = SecretKey()
1815
token = os.getenv('TELEGRAM_BOT_TOKEN_REPORT_ALARM_SECRET')
1916
TELEGRAM_CHANNEL_ID_HANKYUNG_CONSEN = os.getenv('TELEGRAM_CHANNEL_ID_HANKYUNG_CONSEN')
20-
17+
TELEGRAM_CHANNEL_ID_REPORT_ALARM = os.getenv('TELEGRAM_CHANNEL_ID_REPORT_ALARM')
2118

2219
JSON_FILE_NAME = './json/hankyungconsen_research.json'
2320

@@ -116,7 +113,7 @@ async def main():
116113
if lists:
117114
for sendMessageText in lists:
118115
await sendMarkDownText(token=token,
119-
chat_id=SECRET_KEY.TELEGRAM_CHANNEL_ID_REPORT_ALARM,
116+
chat_id=TELEGRAM_CHANNEL_ID_REPORT_ALARM,
120117
sendMessageText=sendMessageText)
121118
update_main_ch_send_yn_to_y(JSON_FILE_NAME)
122119

0 commit comments

Comments
 (0)