Commit graph

26 commits

Author SHA1 Message Date
vrubelroman
8080921141 fix periodic-check request queue throughput bottleneck
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 12s
The bot's request_queue.py 4s FIFO gate wasn't protecting against Lichess's
rate limiter — that's already handled downstream in LichessWebServices/
rate_limiter.py (0.2s, shared across all callers of our stats service). The
bot-side gate only paced calls to our own local service, and since it awaited
each request to full completion before dequeuing the next, real dispatch gaps
were max(4s, previous request's duration) — with 454 tracked gamer/user pairs,
any burst (e.g. after a restart) piled into the queue and took 10-20+ minutes
to drain.

Replace it with a paced-dispatch + bounded-concurrency design: a hard 2s floor
between dispatches (still never lets 2+ requests through in that window),
decoupled from completion time, with up to 10 requests actually in flight at
once via a semaphore. Doesn't touch the real Lichess-facing rate limit at all.

Also add deterministic per-(user,gamer) checkpoint jitter: previously every
pair sharing the same period_minutes re-locked onto the same wall-clock phase
on every restart (backlog collapse snaps period_end_approx to `now` for
everyone overdue at once), recreating the pileup each time. Jitter is stable
across restarts (crc32-based, not Python's salted hash()) and capped well
under the 2h stale-backlog threshold. Small startup stagger added too, purely
cosmetic smoothing on top of the jitter fix.
2026-07-04 20:30:49 +00:00
vrubelroman
8828375207 refactor: move bot tokens to .env, remove hardcoded credentials
- Remove IS_PROD flag and hardcoded tokens from config.py
- Read TELEGRAM_BOT_TOKEN and ADMINPANEL_TELEGRAM_BOT_TOKEN from env
- Add env_file: .env to lichess-bot and admin-bot in docker-compose.yml
- Add .env to .gitignore (no longer tracked)
- Add .env.example with test tokens
2026-06-30 18:15:44 +00:00
vrubelroman
a5e3e6903d some 2026-06-09 11:50:47 +00:00
vrubelroman
0e3a0bfc48 Change API host port to 8002 2026-03-21 23:14:51 +03:00
vrubel
3ffcf97c3f isProd = false 2026-02-05 23:53:36 +03:00
vrubel
20f96d0e0a fix critical bugs 2026-02-05 01:38:33 +03:00
vrubelroman
0de0deb14f delay in config and setup = 5sec 2026-02-04 23:51:32 +03:00
vrubelroman
50c5e93343 версионность не в конфиге 2025-11-23 13:11:58 +03:00
vrubelroman
123749415a switch ru/en 2025-11-20 12:43:00 +03:00
vrubelroman
0e66a05b90 delete activ status 2025-11-16 23:36:57 +03:00
vrubelroman
c39bb33282 messages when doing questions 2025-11-16 23:10:08 +03:00
vrubelroman
6abe9a50c1 ver 1.1.0 2025-11-16 22:50:44 +03:00
vrubelroman
14db5765a5 add about /support in /start 2025-11-16 22:17:44 +03:00
vrubelroman
97996efcda add if else prod or test key telegram 2025-11-16 22:09:37 +03:00
vrubelroman
0061516718 add scripts pull variations 2025-11-16 21:52:05 +03:00
vrubelroman
d23f026b19 add versions 2025-11-16 21:36:48 +03:00
vrubelroman
3f5f4f14b9 add timers 1 2 3 6 12 24 hours 2025-11-16 21:01:14 +03:00
vrubelroman
d52e962022 fix /start and lastYear_or_1000games 2025-11-16 20:07:52 +03:00
vrubelroman
d1e8d343ba edit config 2025-11-16 14:43:04 +03:00
vrubel
1d485fc100 bug fixed /addplayer 2025-11-16 13:38:25 +03:00
vrubelroman
23de80f94d admin panel 2025-11-13 01:00:48 +03:00
vrubelroman
a5d6481495 Вернуть config.py в репозиторий
- Удален config.py из .gitignore
- config.py теперь отслеживается в git
- Позволяет синхронизировать настройки между машинами
2025-10-31 19:39:40 +03:00
vrubelroman
cb1c6b9caf Добавить config.py в .gitignore
- Добавлен config.py и LichessClientTG_bot/config.py в .gitignore
- Удален config.py из отслеживания git (файл остается локально)
2025-10-31 19:08:01 +03:00
vrubel
974b5ea603 после /start /addgamer 2025-10-29 11:32:45 +03:00
vrubel
9e79b97672 поменял ключ 2025-10-29 00:59:36 +03:00
vrubelroman
a08fc8c962 Создание единого проекта Lichess Statistics Ecosystem
- Объединены три проекта в один репозиторий
- LichessWebServices - REST API для статистики
- LichessClientTG_bot - Telegram бот с поддержкой множества пользователей
- LichessWebView - Веб-интерфейс для просмотра пользователей и игроков
- Добавлен общий docker-compose.yml для запуска всех сервисов
- Добавлен скрипт start.sh для удобного запуска
- Добавлен README с полным описанием проекта
2025-10-26 20:23:26 +03:00