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

Check supabase if user quota data is not in redis #10

Open
nang-dev opened this issue Jul 25, 2024 · 12 comments
Open

Check supabase if user quota data is not in redis #10

nang-dev opened this issue Jul 25, 2024 · 12 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@nang-dev
Copy link

nang-dev commented Jul 25, 2024

https://github.com/trypear/pearai-server/blob/8733caae595124959cf8ec34b301fb6b0ae5f2ba/api/app/services/quota_service.py#L15

current logic:

  1. check user quota data in redis
  2. if not exists, create new user quota data in redis

the logic should be

  1. check user quota data is in redis
  2. if not exists, check user quota data in supabase
  3. if not exists, create new user quota data in redis and supabase

This is not that pressing atm as our redis cache is big enough for every user but should be done at some point for sure

@nang-dev nang-dev added the help wanted Extra attention is needed label Jul 25, 2024
@quangcito
Copy link

pls correct me if i'm wrong. in number 3, should it be "create" instead of "check"? @nang-dev

@nang-dev
Copy link
Author

yes. do you mind taking this up? @quangcito

@quangcito
Copy link

On it! @nang-dev

@nang-dev
Copy link
Author

legendary

@quangcito quangcito self-assigned this Aug 21, 2024
@quangcito
Copy link

quangcito commented Aug 31, 2024

@nang-dev sr for the delay, ig i'll wait until fast-api refactoring completes. lmk if you guys need help with those unit tests or smth.

@nang-dev
Copy link
Author

nang-dev commented Sep 2, 2024

@quangcito fast api wont affect this - you can proceed!

@quangcito
Copy link

@nang-dev awesome, gotcha!!

@nang-dev
Copy link
Author

how is this, quang?

@Fryingpannn Fryingpannn transferred this issue from another repository Sep 13, 2024
@Fryingpannn Fryingpannn transferred this issue from trypear/pearai-server-issues-public Sep 13, 2024
@Fryingpannn Fryingpannn transferred this issue from another repository Sep 13, 2024
@quangcito
Copy link

quangcito commented Sep 16, 2024

@nang-dev actively working on it rn 🥲!

@quangcito
Copy link

quangcito commented Sep 16, 2024

@nang-dev [BLOCKER] can I have access to Supabase dev account to look at the schema and setup the quota table if needed?

@quangcito
Copy link

@nang-dev any update on my access request?

@nang-dev
Copy link
Author

HOLY my bad. been busy with the move. DM'd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

2 participants