-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Track organization artifacts cleanup #8418
Conversation
Add an extra field on the `Organization` model to keep track if its artificats were already cleanup. This allows us to filter disabled organization and run the cleaning periodically. The new field `Organization.artifacts_cleaned` is automatically set as `False` when a new build happens for any Project under the organization and is set to `True` when running a Django Admin action over the organization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change how we're setting this data.
660cc53
to
46d63ef
Compare
If this is only taking into consideration if the organization has built versions, I think this can be a property instead, we already track if a version is built in the model readthedocs.org/readthedocs/builds/models.py Line 150 in 92f6224
|
@stsewd I don't understand this comment. We are trying to solve a billing issue, not anything with the builders or Version state. Basically this PR: https://github.com/readthedocs/readthedocs-ops/pull/982/files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks simple enough 👍
Add an extra field on the
Organization
model to keep track if its artifactswere already cleanup. This allows us to filter disabled organizations and run the
cleaning periodically.
The new field
Organization.artifacts_cleaned
is automatically set asFalse
when a new build happens for any Project under the organization and is set to
True
when running a Django Admin action over the organization.