• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

galthran-wq / telegram-scraper-service / 25725867271
68%

Build:
DEFAULT BRANCH: master
Ran 12 May 2026 09:30AM UTC
Jobs 1
Files 17
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 May 2026 09:30AM UTC coverage: 67.568% (+5.3%) from 62.301%
25725867271

push

github

web-flow
feat: hot-add sessions via StringSession + pool-status endpoint (#6)

* feat: hot-add sessions via StringSession + pool-status endpoint

- SessionPool accepts both legacy .session SQLite files and new
  .stringsession text files (one Telethon StringSession per file)
- Background rescan loop discovers new session files at runtime, so
  operators add accounts without restarting the container
- add_session.py / list_sessions.py / remove_session.py read/write
  sessions_dir directly; stdin-only input keeps the blob out of ps
- /api/pool/status exposes alive/configured counts, per-session
  connected flag, and a ring buffer of recent evictions (with reason)
  for duty-agent monitoring
- retry.py now passes the Telethon exception class name into
  remove_client as the eviction reason

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(session-pool): release lock during connect + immediate rescan via /api/pool/rescan

Review fixes (from code-review pass on PR #6):

- SessionPool.rescan and add_string_session no longer hold _lock across
  the multi-second _connect() I/O. Instead they reserve the candidate
  path in a new _inflight_rescan_paths set under the lock, connect
  outside the lock, then re-acquire to append. get_next() is no longer
  blocked during a rescan storm.

- New POST /api/pool/rescan endpoint. scripts/add_session.py now calls
  it after writing the .stringsession file so the new account joins
  the pool immediately (was previously waiting up to 30s for the
  background rescan tick).

- add_session.py no longer formats the raw exception body into the
  error JSON — only the exception class name. A Telethon parse error
  could otherwise echo a fragment of the StringSession into docker
  logs / Loki.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

139 of 184 new or added lines in 6 files covered. (75.54%)

39 existing lines in 2 files now uncovered.

525 of 777 relevant lines covered (67.57%)

0.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
40
68.26
43.26% src/core/session_pool.py
3
76.92
src/api/endpoints/pool.py
2
52.08
-13.63% src/core/retry.py

Coverage Regressions

Lines Coverage ∆ File
22
68.26
43.26% src/core/session_pool.py
17
52.08
-13.63% src/core/retry.py
Jobs
ID Job ID Ran Files Coverage
1 25725867271.1 12 May 2026 09:30AM UTC 17
67.57
GitHub Action Run
Source Files on build 25725867271
  • Tree
  • List 17
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25725867271
  • 54169db9 on github
  • Prev Build on master (#22133430710)
  • Next Build on master (#25728546628)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc