Implement Placeholder Reassignment Expiration Worker
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Background
As part of the data retention policy for user contribution mapping tables &17248, group owners have a 1-year window to perform user reassignments. After this period expires, contributions will remain assigned to placeholder users if no action is taken.
Objective
Implement a cronjob that automatically updates the status of expired import source users to "keep as placeholder user".
Technical Details
The worker should:
- Run every 6 hours (cron:
0 */6 * * *) - Query
import_source_userstable for records where:reassignment_expires_at <= NOW()- Status is "pending reassignment"
- Update these records to "keep as placeholder" status
- Process records in batches using loop-based batching
- Use a batch size of 1,000 records
Implementation Notes
- Follow loop-based batching best practices
Edited by 🤖 GitLab Bot 🤖