feat(uptime): Add UptimeResponseCapture to cleanup infrastructure#107079
feat(uptime): Add UptimeResponseCapture to cleanup infrastructure#107079
Conversation
Register UptimeResponseCapture with the deletions framework so that old response captures are cleaned up. Uses ModelDeletionTask to ensure the custom delete() method is called, which properly removes the associated File and its storage blobs. Also adds an index on date_added for cleanup queries.
|
This PR has a migration; here is the generated SQL for for --
-- Create index uptime_upti_date_ad_d591fd_idx on field(s) date_added of model uptimeresponsecapture
--
CREATE INDEX CONCURRENTLY "uptime_upti_date_ad_d591fd_idx" ON "uptime_uptimeresponsecapture" ("date_added"); |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| url="https://example.com", | ||
| interval_seconds=60, | ||
| timeout_ms=5000, | ||
| ) |
There was a problem hiding this comment.
Test bypasses established fixture pattern for consistency
Low Severity
The test creates an UptimeSubscription directly via UptimeSubscription.objects.create() instead of using the available self.create_uptime_subscription() fixture method. Other tests in the same file follow the fixture pattern (e.g., self.create_project(), self.create_group()). Using the fixture would be consistent with the codebase's test patterns and provide default values, making the test more maintainable if the model's required fields change.
…07079) Register UptimeResponseCapture with the deletions framework so that old response captures are cleaned up. Uses ModelDeletionTask to ensure the custom delete() method is called, which properly removes the associated File and its storage blobs. Also adds an index on date_added for cleanup queries. <!-- Describe your PR here. -->
Register UptimeResponseCapture with the deletions framework so that old response captures are cleaned up. Uses ModelDeletionTask to ensure the custom delete() method is called, which properly removes the associated File and its storage blobs.
Also adds an index on date_added for cleanup queries.