Skip to content

Run the scheduled check when the window closes, if one was skipped - #597

Open
martin152 wants to merge 1 commit into
linuxmint:masterfrom
martin152:run-skipped-check
Open

martin152 wants to merge 1 commit into
linuxmint:masterfrom
martin152:run-skipped-check

Conversation

@martin152

Copy link
Copy Markdown

The hourly check gives up when another instance holds the lock, and an open window holds it the
whole time it's open. So a snapshot that falls due while the window is open waits another hour.
My backup disk is only plugged in now and then, and by then it's often unplugged again.

A check that is turned away by a window now leaves a mark next to the lock, and the window runs
the check when it closes. If no check was skipped nothing changes.

I went with this rather than making the window give up the lock while it's idle, because the
lock also protects the config and running tasks, and I didn't want to change that.

Tested on a scratch disk image with weekly and monthly due. With the window open the check
logged Scheduled check skipped, it will run when the Timeshift window is closed and left the
mark. I closed the window at 00:28:38, and the check that started then logged
Last weekly snapshot not found, saved the snapshot in 3 s and tagged it W and M.

The hourly check exits when another Timeshift instance holds the lock,
and an open window holds it for as long as it is open. A snapshot that
fell due while the window was open was then put off by an hour, and
not taken at all if the backup disk was unplugged before then.

A check that is turned away by a window now leaves a mark next to the
lock, and the window runs the check when it closes. Nothing changes
when no check was skipped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant