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

Add API endpoint to recalculate org storage #1943

Merged
merged 7 commits into from
Jul 20, 2024

Conversation

tw4l
Copy link
Member

@tw4l tw4l commented Jul 17, 2024

Fixes #1942

This process might be a bit slow for large orgs, so I added a note to consider moving it to a background job in #1898.

@tw4l tw4l requested a review from ikreymer July 17, 2024 21:51
@tw4l
Copy link
Member Author

tw4l commented Jul 17, 2024

Made a few small tweaks but should be good for review now @ikreymer :)

"/recalculate-storage", tags=["organizations"], response_model=SuccessResponse
)
async def recalculate_org_storage(org: Organization = Depends(org_owner_dep)):
return await ops.recalculate_storage(org)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I thought maybe it should return the recalculated storage, but that would make it harder to convert to a bg job, so this makes sense.

@ikreymer ikreymer merged commit 2237120 into main Jul 20, 2024
1 of 4 checks passed
@ikreymer ikreymer deleted the issue-1942-recalculate-org-storage branch July 20, 2024 01:29
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

Successfully merging this pull request may close these issues.

Add API endpoint to recalculate org storage
2 participants