-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add per-SP piece cleanup job to bound storage growth #346
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
Open
Chaitu-Tatipamula
wants to merge
10
commits into
FilOzone:main
Choose a base branch
from
Chaitu-Tatipamula:feat/piece-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bc709a7
feat(piece-cleanup): add config, entity columns, and env vars for pie…
Chaitu-Tatipamula f065aa1
feat(piece-cleanup): implement core cleanup service and jobs integration
Chaitu-Tatipamula b5d6375
refactor: optimize piece cleanup job execution and fix timeout leak
Chaitu-Tatipamula ecc858b
fix(piece-cleanup): address PR review feedback on cleanup service
Chaitu-Tatipamula cd487f4
chore(db): add migration for piece cleanup columns
Chaitu-Tatipamula f7d6991
docs: document piece_cleanup job
Chaitu-Tatipamula ebf3922
refactor(piece-cleanup): remove fileSize fallback from bytesRemoved c…
Chaitu-Tatipamula fd66be7
test(jobs): add default isProviderOverQuota mock to prevent "... is n…
Chaitu-Tatipamula 21e0b70
feat(piece-cleanup): use live provider storage for quota decisions
Chaitu-Tatipamula 62c2bf3
fix(piece-cleanup): align with synapse-sdk integration
Chaitu-Tatipamula File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
apps/backend/src/database/migrations/1761500000002-AddPieceCleanupColumns.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import type { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
|
||
| export class AddPieceCleanupColumns1761500000002 implements MigrationInterface { | ||
| name = "AddPieceCleanupColumns1761500000002"; | ||
|
|
||
| public async up(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(` | ||
| ALTER TABLE deals | ||
| ADD COLUMN IF NOT EXISTS cleaned_up BOOLEAN NOT NULL DEFAULT false, | ||
| ADD COLUMN IF NOT EXISTS cleaned_up_at TIMESTAMPTZ NULL | ||
| `); | ||
| } | ||
|
|
||
| public async down(queryRunner: QueryRunner): Promise<void> { | ||
| await queryRunner.query(`ALTER TABLE deals DROP COLUMN IF EXISTS cleaned_up_at`); | ||
| await queryRunner.query(`ALTER TABLE deals DROP COLUMN IF EXISTS cleaned_up`); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.