issue-54-worker-rsync-state #56

Merged
parkel merged 3 commits from issue-54-worker-rsync-state into master 2026-05-23 00:39:47 +02:00
Owner

Summary

  • Record live rsync log/snapshot state for normal backup runs so stale running rows can be reconciled.
  • Track rsync process phase and PID/PGID while a real backup is active.
  • Mark terminal rsync log failures such as broken pipe/code 255 as failed even if the worker did not finish cleanly.
  • Treat rsync vanished-file exit code 24 as a warning and keep the completed snapshot.

Tests

  • .venv/bin/python manage.py test pobsync_backend.tests.test_backup_worker pobsync_backend.tests.test_run_scheduled_config_source -v 2
    • Ran 30 tests in 0.080s
    • OK
  • .venv/bin/python manage.py test pobsync_backend -v 2
    • Ran 210 tests in 17.585s
    • FAILED (errors=1)
    • Known local environment/test-path issue: #55, writes to /opt/pobsync in local venv where that path is read-only.

Closes #54

## Summary - Record live rsync log/snapshot state for normal backup runs so stale running rows can be reconciled. - Track rsync process phase and PID/PGID while a real backup is active. - Mark terminal rsync log failures such as broken pipe/code 255 as failed even if the worker did not finish cleanly. - Treat rsync vanished-file exit code 24 as a warning and keep the completed snapshot. ## Tests - `.venv/bin/python manage.py test pobsync_backend.tests.test_backup_worker pobsync_backend.tests.test_run_scheduled_config_source -v 2` - `Ran 30 tests in 0.080s` - `OK` - `.venv/bin/python manage.py test pobsync_backend -v 2` - `Ran 210 tests in 17.585s` - `FAILED (errors=1)` - Known local environment/test-path issue: #55, writes to `/opt/pobsync` in local venv where that path is read-only. Closes #54
parkel added 3 commits 2026-05-23 00:39:43 +02:00
Record live rsync log paths for normal backup runs so the worker can
recover stale running state after terminal rsync errors.

Treat rsync vanished-file exit code 24 as a warning and keep the
completed snapshot instead of failing the run into incomplete state.

Closes #54
Record rsync process pid and execution phase while normal backup runs are
active so the worker can reconcile stale running rows when rsync has
already disappeared.

Keep finalizing runs out of the missing-process path to avoid marking
slow post-rsync stats collection as a failed transfer.

Closes #54
Only pass the process_started hook when live run state tracking is active,
so existing rsync call sites and tests without that hook remain compatible.

Refs #54
parkel merged commit df9ec5b04c into master 2026-05-23 00:39:47 +02:00
parkel deleted branch issue-54-worker-rsync-state 2026-05-23 00:39:47 +02:00
Sign in to join this conversation.