Commit Graph

42 Commits

Author SHA1 Message Date
Fringg
1f0fef114b refactor: complete structlog migration with contextvars, kwargs, and logging hardening
- Add ContextVarsMiddleware for automatic user_id/chat_id/username binding
  via structlog contextvars (aiogram) and http_method/http_path (FastAPI)
- Use bound_contextvars() context manager instead of clear_contextvars()
  to safely restore previous state instead of wiping all context
- Register ContextVarsMiddleware as outermost middleware (before GlobalError)
  so all error logs include user context
- Replace structlog.get_logger() with structlog.get_logger(__name__) across
  270 calls in 265 files for meaningful logger names
- Switch wrapper_class from BoundLogger to make_filtering_bound_logger()
  for pre-processor level filtering (performance optimization)
- Migrate 1411 %-style positional arg logger calls to structlog kwargs
  style across 161 files via AST script
- Migrate log_rotation_service.py from stdlib logging to structlog
- Add payment module prefixes to TelegramNotifierProcessor.IGNORED_LOGGER_PREFIXES
  and ExcludePaymentFilter.PAYMENT_MODULES to prevent payment data leaking
  to Telegram notifications and general log files
- Fix LoggingMiddleware: add from_user null-safety for channel posts,
  switch time.time() to time.monotonic() for duration measurement
- Remove duplicate logger assignments in purchase.py, config.py,
  inline.py, and admin/payments.py
2026-02-16 09:18:12 +03:00
Ali Morshedzadeh
5482e609f8 Add initial Persian locale support and language handling updates 2026-02-09 16:53:50 +03:30
Egor
6c26d5c7f8 Update texts.py 2026-01-31 21:13:04 +03:00
c0mrade
9a2aea038a chore: add uv package manager and ruff linter configuration
- Add pyproject.toml with uv and ruff configuration
- Pin Python version to 3.13 via .python-version
- Add Makefile commands: lint, format, fix
- Apply ruff formatting to entire codebase
- Remove unused imports (base64 in yookassa/simple_subscription)
- Update .gitignore for new config files
2026-01-24 17:45:27 +03:00
Egor
c61cd0b42e Update texts.py 2026-01-17 01:19:12 +03:00
belousotroll
ceb45b4c0b add policy page at registration stage 2025-11-22 21:30:11 +07:00
Egor
a697ffa8f1 Fix dynamic traffic localization prices 2025-11-11 10:28:09 +03:00
Pavel Stryuk
bd73ad069f 1) Отображение скидки на кнопках (красивое!)
2) У промогрупп появится приоритет
3) У пользователя может быть несколько промогрупп, но влиять будет только с наивысшим приоритетом
4) Промокоды с промогруппой
5) При выводе пользователей с промогруппой будет также выводиться ссылка на каждого. Можно будет отследить сливы промокодов "для своих". Я в целом это добавлю во все места, где пользователь выводится в админке
6) Исправить баг исчезновения триалки при пополнении
7) Исправить падающие тесты и добавить новых
8) Трафик: 0 ГБ в тестовой подписке исправить на Трафик: Безлимит
9) При попытке изменить промогруппу "Пользователь не найден" - исправил
2025-11-04 20:36:01 +01:00
Pavel Stryuk
427011fe41 1) Отображение скидки на кнопках (красивое!)
2) У промогрупп появится приоритет
3) У пользователя может быть несколько промогрупп, но влиять будет только с наивысшим приоритетом
4) К промокодам можно будет добавить промогруппу. Все активировавшие промокод получат её
5) При выводе пользователей с промогруппой будет также выводиться ссылка на каждого. Можно будет отследить сливы промокодов "для своих". Я в целом это добавлю во все места, где пользователь выводится в админке
6) Исправить баг исчезновения триалки при пополнении
7) Исправить падающие тесты и добавить новых
8) Трафик: 0 ГБ в тестовой подписке исправить на Трафик: Безлимит
2025-11-04 13:05:02 +01:00
Egor
ad03fa070a Hide zero price in subscription period options 2025-10-30 03:06:16 +03:00
Egor
1c3f2c7500 Update texts.py 2025-09-23 01:21:47 +03:00
PEDZEO
f0ae702933 Fix ticket system: add noop handlers, pagination, validation, and admin back button routing 2025-09-22 21:40:10 +03:00
Egor
feb95fe105 Fix async rules loading for new users 2025-09-20 01:49:29 +03:00
yazhog
e2137f94f8 Use configurable default language 2025-09-19 10:57:49 +03:00
yazhog
31c560093d Промежуточный этап локализации 2025-09-18 09:09:55 +03:00
yazhog
ea85d4f62e Rename referrals button to partnerka 2025-09-18 00:30:01 +03:00
Egor
4997acd8bc Update texts.py 2025-09-17 01:44:17 +03:00
Egor
e9a2d8a232 Update texts.py 2025-09-12 09:07:16 +03:00
Egor
f2a972aeea Update texts.py 2025-09-12 04:18:21 +03:00
yazhog
6ffbad747d Правка текстов 2025-09-09 10:21:13 +03:00
yazhog
1d5b52ef5b Переброс при недостаточно балансе на пополнение баланса 2025-09-07 22:16:49 +03:00
yazhog
3f37be4509 feat: add top up prompt on insufficient balance 2025-09-07 22:03:27 +03:00
yazhog
bb8e513598 feat: display ruble prices without kopecks 2025-09-07 13:13:03 +03:00
Egor
73dc22b0b8 Update texts.py 2025-09-04 04:27:33 +03:00
Egor
5a082f0eb8 Update texts.py 2025-09-04 04:20:58 +03:00
Egor
8e67c7a97a Update texts.py 2025-09-03 20:09:01 +03:00
Egor
c938d48026 Update texts.py 2025-09-03 20:02:46 +03:00
Egor
99a4927f8a Update texts.py 2025-09-03 19:53:10 +03:00
Egor
a6bbd8f8fb Add files via upload 2025-09-03 06:39:35 +03:00
Egor
df139b3d34 Update texts.py 2025-09-03 06:22:09 +03:00
Egor
e898948073 Update texts.py 2025-09-03 05:59:21 +03:00
Egor
b09b7a0c84 Add files via upload 2025-08-30 23:21:04 +03:00
Egor
496978e8a2 Update texts.py 2025-08-30 19:11:45 +03:00
Egor
80c771b7bc Update texts.py 2025-08-30 18:59:08 +03:00
Egor
6e344d350b Update texts.py 2025-08-30 18:58:30 +03:00
Egor
6c4c39b454 Add files via upload 2025-08-30 14:35:38 +03:00
Egor
0e97632099 Update texts.py 2025-08-27 05:50:43 +03:00
Egor
5c72c04d27 Update texts.py 2025-08-22 12:25:42 +03:00
Egor
ecbfcd2b54 Update texts.py 2025-08-22 11:40:27 +03:00
Egor
8e47013ae2 Update texts.py 2025-08-22 11:09:54 +03:00
Egor
dc6a829f0f Update texts.py 2025-08-22 01:12:26 +03:00
Egor
736e4c6cae NEW VERSION
NEW VERSION
2025-08-20 23:57:04 +03:00