Skip to content

Conversation

@JacksonFergusonDev
Copy link
Owner

Description

This PR introduces a weekly maintenance schedule to the background daemon. Previously, users had to manually run git pulsar prune to clean up old backup refs. Now, the daemon automatically performs this garbage collection every 7 days for all registered repositories.

Changes

  • Refactor (src/git_pulsar/ops.py): Updated prune_backups to accept an explicit repo_path argument, decoupling it from the current working directory so the daemon can manage multiple repos.
  • Feature (src/git_pulsar/daemon.py): Added run_maintenance routine. It checks a last_prune timestamp file in the registry; if missing or older than 7 days, it triggers a 30-day retention prune on all tracked repositories.
  • Docs (README.md): Updated the command reference to clarify that prune is now an automated background task.

Checklist

  • Daemon logic updated with maintenance timer
  • prune_backups refactored for non-interactive use
  • Documentation updated

Updates the daemon to perform maintenance tasks. A `run_maintenance`
routine now checks for a `last_prune` marker file in the registry
directory. If the marker is missing or older than 7 days, the daemon
triggers `prune_backups` (30-day retention) for all registered
repositories and updates the timestamp.
@JacksonFergusonDev JacksonFergusonDev merged commit 382aacb into main Jan 31, 2026
4 checks passed
@JacksonFergusonDev JacksonFergusonDev deleted the schedule branch January 31, 2026 22:14
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.

2 participants