feat: Implement task and reward tracking feature
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 24s

- Added tracking events for tasks, penalties, and rewards with timestamps.
- Created new TinyDB table for tracking records to maintain audit history.
- Developed backend API for querying tracking events with filters and pagination.
- Implemented logging for tracking events with per-user rotating log files.
- Added unit tests for tracking event creation, querying, and anonymization.
- Deferred frontend changes for future implementation.
- Established acceptance criteria and documentation for the tracking feature.

feat: Introduce account deletion scheduler

- Implemented a scheduler to delete accounts marked for deletion after a configurable threshold.
- Added new fields to the User model to manage deletion status and attempts.
- Created admin API endpoints for managing deletion thresholds and viewing the deletion queue.
- Integrated error handling and logging for the deletion process.
- Developed unit tests for the deletion scheduler and related API endpoints.
- Documented the deletion process and acceptance criteria.
This commit is contained in:
2026-02-09 15:39:43 -05:00
parent 27f02224ab
commit 3dee8b80a2
20 changed files with 1450 additions and 0 deletions

View File

@@ -16,3 +16,5 @@ class EventType(Enum):
USER_MARKED_FOR_DELETION = "user_marked_for_deletion"
USER_DELETED = "user_deleted"
TRACKING_EVENT_CREATED = "tracking_event_created"

View File

@@ -0,0 +1,27 @@
from events.types.payload import Payload
class TrackingEventCreated(Payload):
def __init__(self, tracking_event_id: str, child_id: str, entity_type: str, action: str):
super().__init__({
'tracking_event_id': tracking_event_id,
'child_id': child_id,
'entity_type': entity_type,
'action': action
})
@property
def tracking_event_id(self) -> str:
return self.get("tracking_event_id")
@property
def child_id(self) -> str:
return self.get("child_id")
@property
def entity_type(self) -> str:
return self.get("entity_type")
@property
def action(self) -> str:
return self.get("action")