Skip to content

Commit 2106ae1

Browse files
committed
merge
2 parents 963c8c6 + 8b989ec commit 2106ae1

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build-latency-bot:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Build the Docker image for latency bot
15+
run: docker build --file dockerfile.latency_bot --tag latency-bot:latest .
16+
- name: Save Docker image to TAR
17+
run: docker save latency-bot:latest -o latency-bot.tar
18+
- name: Upload latency bot image artifact
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: latency-image-tar
22+
path: latency-bot.tar
23+
retention-days: 5
24+
25+
build-flask-uploader:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Build the Docker image for flask uploader
30+
run: docker build --file dockerfile.uploader --tag flask-uploader:latest .
31+
- name: Save Docker image to TAR
32+
run: docker save flask-uploader:latest -o flask-uploader.tar
33+
- name: Upload flask uploader image artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: uploader-image-tar
37+
path: flask-uploader.tar
38+
retention-days: 5

latency_bot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
TELEGRAM_BOT_TOKEN = config['bot_token']
1212
CHAT_ID = config['chat_id']
1313
MONITOR_WS_URL = config['monitor_ws_url']
14+
ALLOWED_LATENCY = config.get('allowed_latency', 500)
1415

1516
bot = telebot.TeleBot(TELEGRAM_BOT_TOKEN)
1617
loop = asyncio.get_event_loop()

0 commit comments

Comments
 (0)