lookit / lookit/lookit-api

Add a response data cleanup task

Open
#603 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Cleanup Developer XS
Dominant language
Python
Stars
12
Forks
21
Avg merge
5d 19h
Merged PRs (30d)
5

Description

**TL;DR**: Add a periodic task to remove old empty session data.

About half our responses on production have no completed consent frame. Adding a task to remove sessions older than ~1 month with completed_consent_frame False would reduce DB size and the number of records fetched when using the participant API. It would also ensure that video collected during these sessions (i.e. during previewing) was deleted in a timely fashion to avoid storing large amounts of inaccessible video.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or task entry point. Start by locating the periodic-task configuration and the response/session data model, then trace how participant API records and preview video are stored. Done means a scheduled cleanup removes sessions older than about one month when completed_consent_frame is false, including associated inaccessible video.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.