Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Create store for Moderator settings#1320

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jb3 wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromjb3/user-props-store
Draft

Conversation

jb3
Copy link
Member

@jb3jb3 commentedMay 19, 2024
edited
Loading

This PR introduces aUserModSettings model to store properties related to
moderator preference that we currently store in Redis. This is part of a wider
scale effort to migrate away from Redis any data which would be anything more
than slightly annoying in the event it gets lost.

This will require bot side changes but it is not a breaking change to merge this
when it is ready. Some manual migration will be required to move the current
moderator settings from Redis into this new PostgreSQL table.

I have added a basic copy of the cache data that we use on Redis, adding some
constraints to ensure that we do not end up retaining partially valid data (i.e.
a moderator schedule that has a start time but no duration).

Tasks required for this PR:

  • Create a new model to store settings in
  • Update serializers to be compatible with serializing this new field
  • Update viewsets to allow this field to be returned optionally, saving
    processing time when it is not needed
  • Add new routes for the bot to PATCH data to this endpoint to update a
    moderators settings
  • Write new tests for models and routes

Any input from those wiser with Django than me would be appreciated to
maximimise the optimisation of these endpoints and models.

@netlifyNetlify
Copy link

netlifybot commentedMay 19, 2024
edited
Loading

Deploy Preview forpydis-static failed.

NameLink
🔨 Latest commite6a8668
🔍 Latest deploy loghttps://app.netlify.com/sites/pydis-static/deploys/6652b6661eae34000817b0e4

@jchristgit
Copy link
Member

Request a review from me if this is ready for review

@jb3jb3force-pushed thejb3/user-props-store branch 3 times, most recently fromd9ddde5 to7f9844aCompareMay 24, 2024 00:24
jb3 added2 commitsMay 26, 2024 03:57
Update imports in API models to include UserModSettingsAdd migration for UserModSettings model
@jb3jb3force-pushed thejb3/user-props-store branch from7f9844a to34aa926CompareMay 26, 2024 02:58
@jb3jb3force-pushed thejb3/user-props-store branch from369bdb6 to36ba55bCompareMay 26, 2024 04:00
@jb3jb3force-pushed thejb3/user-props-store branch from36ba55b toe6a8668CompareMay 26, 2024 04:11
@jchristgitjchristgit self-assigned thisJun 20, 2024
@jchristgit
Copy link
Member

Hello@jb3, what's the status with this PR?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@jchristgitjchristgit

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jb3@jchristgit

[8]ページ先頭

©2009-2025 Movatter.jp