Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Asker Kakhramanov committed Feb 25, 2024
1 parent 3f6ec4f commit 61d0c04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bot-weather.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

# Шаг 3: Устанавливаем зависимости (в нашем случае фреймворк для тестирования pytest и telebot)
- name: Install dependencies
run: pip install pytest python-telegram-bot requests pytz
run: pip install pytest python-telegram-bot requests pytz prometheus_client

# Шаг 4: Запускаем юнит-тесты с помощью pytest
- name: Run tests
Expand Down Expand Up @@ -98,4 +98,4 @@ jobs:
# Изменение прав доступа к файлу id_rsa
chmod 600 ~/.ssh/id_rsa
# Выполнение команды для перезагрузки службы systemd на удаленном сервере
ssh ${{ secrets.username }}@${{ secrets.remote_host }} 'sudo systemctl restart bot-weather.service'
ssh ${{ secrets.username }}@${{ secrets.remote_host }} 'sudo systemctl restart bot-weather.service'
1 change: 1 addition & 0 deletions weather/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Weather Bot - это бот для Telegram, который помогает в
- Python 3
- python-telegram-bot
- requests
- prometheus_client

Вы можете установить их с помощью следующих команд:

Expand Down
7 changes: 0 additions & 7 deletions weather/bot-weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
import os
from prometheus_client import start_http_server, Counter, Gauge

REQUESTS_COMMANDS = Counter('bot_football_commands',
'Bot football commands requested.',
labelnames=['command'])

LAST = Gauge('bot_football_last_time_seconds',
'The last time a bot football was served.')

# Задаем константы
TOKEN = os.environ.get('weather_TOKEN')
CHAT_ID = os.environ.get('weather_CHAT_ID')
Expand Down

0 comments on commit 61d0c04

Please sign in to comment.