umputun / tg-spam

Anti-Spam bot for Telegram and anti-spam library
https://tg-spam.umputun.dev
MIT License
217 stars 39 forks source link

Refactor spam dynamic sample removal logic #62

Closed umputun closed 8 months ago

umputun commented 8 months ago

This change simplifies the removal of dynamic spam samples. It creates a temporary file during sample removal, writes all entries except the one to remove to the new file, and then replaces the original file, instead of storing all samples in memory and writing them back.

cloudflare-workers-and-pages[bot] commented 8 months ago

Deploying tg-spam with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0e8c858
Status: ✅  Deploy successful!
Preview URL: https://fa409597.tg-spam.pages.dev
Branch Preview URL: https://faster-removal.tg-spam.pages.dev

View logs