Skip to content

Detect unison failure: unison doctor command? #163

@grayside

Description

@grayside

In #147, we have acknowledged silent unison failures are a problem.

This issue splits off checking if the unison process for a given project is in working order.

This issue has a secondary goal: providing enough information about the state of failing systems to provide clues on what's going wrong. To that effect we might have a follow-on issue that extends --verbose with additional data to facilitate troubleshooting.

Checks

Things to check/potentially check:

  • Is the unison container for the project running?
  • Can we create a file and see it sync via the log file?
  • Can we create a file locally and see it in the container?
  • Can we create a file in the container and see it locally?
  • Can we see the unison process still exists in the container?
  • Can we see the unison process for this project is still running locally?

Usage

Running this command might look like rig project sync:check.

Background Notifications

By ensuring notifications are triggered for error but not for success, we could also support:

cd ~/path/to/project && rig project sync:check > /dev/null 2>&1

We could put that on a schedule, document how to add it to cron, etc, and give desktop notifications to users when their are unison failures. It might be worth simplifying to the point where we sort out how to fork a process into the background implemented in golang if we need an ongoing monitor.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions