Skip to content

feat: session auto-cleanup cron#28

Open
EricGrill wants to merge 1 commit into
mainfrom
justobot/session-cleanup
Open

feat: session auto-cleanup cron#28
EricGrill wants to merge 1 commit into
mainfrom
justobot/session-cleanup

Conversation

@EricGrill
Copy link
Copy Markdown
Contributor

Summary

  • Adds backend/src/lib/cleanup.js — hourly cron that deletes closed shifts (+ checkins + payments) older than 24h
  • Wired into server startup via startCleanupCron()
  • Matches the old app's session cleanup behavior for labor compliance

Tests

  • 3 new tests (42 total, all passing):
    • Removes old closed shifts and their checkins
    • Preserves recently closed shifts
    • Preserves open shifts regardless of age

Closes

Closes #12

🤖 Generated with Claude Code

Adds a cleanup module that runs hourly and deletes closed shifts
(along with their checkins and payments) older than 24 hours.
Matches the old app's behavior for labor compliance data hygiene.

Includes 3 tests: removes old closed shifts, preserves recent ones,
preserves open ones regardless of age. 42 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session auto-cleanup cron

1 participant