Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user_follow table auto-clean #136

Open
Helias opened this issue Nov 10, 2023 · 1 comment
Open

user_follow table auto-clean #136

Helias opened this issue Nov 10, 2023 · 1 comment

Comments

@Helias
Copy link
Member

Helias commented Nov 10, 2023

we have to add a timestamp field in the user_follow table and clean after 1 year (or less?) the user_follow table, because no-one will unfollow a spot after several months but the data will remain in the db, the db could become bigger and bigger in the years and it's better to clean it automatically.

adding the timestamp it's easy using some alter table and TIMESTAMP as field name and value
adding the auto-clean consists of implementing a daily-job that deletes all the user_follow with X time ago where X should be a configurable variable in terms of months (12 months? 6 months?)

@Helias
Copy link
Member Author

Helias commented Nov 12, 2023

similarly, we can apply this for the reports

TendTo added a commit to TendTo/Telegram-SpottedDMI-Bot that referenced this issue Nov 23, 2023
Helias pushed a commit that referenced this issue Nov 24, 2023
* feat: major refactor telegram -> 20.6

removed reactions
use async functions
split the callback_handlers functions in multiple files
add banned users list to the sban command
use of scoped command list

* test: update tests (wip)

* feat: update docker container

* fix: remove reactions from CI, imrpove default config

* test: update tests for new library

* chore: rename meme_report* to report*

* refactor: renamed all instances of meme to post

* chore: consolidate database's tables

* fix: reintroduce auto init for database

* refactor: update the follow functionality to the new library

* feat: use more restrictive filters

* test: add follow feature tests

* fix: remove trailing &&\

* chore: remove unused imports

* docs: update docs with new modules

* chore: remove old type hinting

* fix: allow admins to call /help

* ci: bump from python 3.9/10 to 3.10/11

* fix: add pytest-asyncio dev-dependency

* refactor: smallest refactor lmao

* feat: ensure that docker works as intended

* fix: show credited users correctly

* feat: run isort

* chore: remove mypy

* feat: add code of conduct and pr template

* docs: update documentation and add requirements

* style: run black

* ci: add new workflows (github actions)

* ci: fix version and sphinx build

* ci: use html, not build

* chore: update linting procedure

* ci: install package before docs

* feat: add changelog

* chore: update README

* chore: update Changelog

* chore: correct linking in readme

* fix: add MANIFEST.in to fix Docker setup

* fix: preview feature, closes #133 (#138)

* fix: typo from previw to preview

* docs: add more examples about Docker in the README

* feat: add /reload command

* docs: add reference to the Telegram-Bot documentation

* docs: use apidoc to generate the module's documentation

* docs: add template

* fix: avoid potential useless read from get_user_sign

* refactor: use PARSE_DECLTYPES for datetime conversion

* refactor: include private_message_id into users

* feat: include ban timestamp

adds a timestamp column to the database and shows it when listing all the banned users
[ closes #124  ] [ from #140 ]

* teat: add reload command test

* feat: add utility script to run the ci pipeline locally

* fix: remove rebase code

* chore: fix typo

* refactor: rename group_id and channel_group_id

As suggested in the pr review, group_id is been renamed to admin_group_id
At the same time, channel_group_id is been renamed to community_group_id
This should clarify the roles both settings have

* chore: removed dangling reaction features

* feat: simplify checks

Most checks are now handled by the dispatcher.
There is no need

* fix: support args for different kind of messages

* feat: activate autoreply command

* style: run black formatter

* refactor: use enum instead of dict for Conversation States

* style: apply black formatter

* feat: add timestamp to post follow [ #136 ]

* feat: remove unused tag setting

* feat: add timestamp to spot report

* feat: add timestamp to published post

* test: update test to new timestamps

* feat: add run_sql script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant