🧹 Add Django management command for cleaning up old data and orphaned files#30
Conversation
…reating test data
|
@skalwaghe-56 Nahh, I just generated the comments to enhance readability and the create_test_data.py script to test its functionality. |
I would strictly recommend not using AI. AI should not be used for contributions and it is should be avoided at any costs. I request you to please not use AI in the future too. Thanks! (Open source contribution is not for AI generated code) |
|
@skalwaghe-56 Bro, chill. I've been coding for several years, and I use it as a companion to make my code more readable by documenting and commenting on it. This helps reviewers and others make proper corrections. |
|
Haha, alright, Mr. “Several Years of Coding” 😎. Just don’t let your AI buddy start writing your pull requests. You shouldn't use AI at all in open-source contribution for actual world code as per me. That would ruin all the fun of open-source! |
|
@skalwaghe-56 Relax, the AI is the GPS, not the driver. It's here to help with the comments and docs, but I'm still the one building the engine. It's a companion, not a replacement. Meanwhile, I think the good-first-issue label is calling your name. |
Nicee! Use AI here as well. Understood who is what? very clearly. |
DimitrovK
left a comment
There was a problem hiding this comment.
I don't like the use of all these emojies (from AI) in the command, can you clear that up please
|
yeah sure |
Implements a Django management command to clean up old AI responses and orphaned resume files to save storage space and maintain database hygiene.
Implementation
Command location: cleanup_old_data.py
Models affected: AIResponse , CVQuestionnaire
File cleanup: Removes orphaned files in MEDIA_ROOT/resumes/
Features
Configurable retention period (default: 90 days)
Dry-run mode for safe testing
Force mode to skip confirmations
Human-readable file size reporting
Empty directory cleanup
Usage
Command Options
Technical Details
AI Response cleanup: Deletes AIResponse objects older than cutoff date
File cleanup: Identifies and removes files not referenced by any CVQuestionnaire
Closes #21