Skip to content

chore: conditionally start file sync daemon#115

Merged
ethanndickson merged 2 commits into
mainfrom
ethan/conditionally-start-daemon
Mar 24, 2025
Merged

chore: conditionally start file sync daemon#115
ethanndickson merged 2 commits into
mainfrom
ethan/conditionally-start-daemon

Conversation

@ethanndickson
Copy link
Copy Markdown
Member

@ethanndickson ethanndickson commented Mar 20, 2025

This makes a few improvements to #98:

  • The mutagen path & data directory can be now be configured on the MutagenDaemon, to support overriding it in tests (coming soon).
  • A mutagen daemon failure now kills the process, such that can it be restarted (TBC).
  • Makes start & stop transitions mutually exclusive via a semaphore, to account for actor re-entrancy.
  • The start operation now waits for the daemon to respond to a version request before completing.
  • The daemon is always started on launch, but then immediately stopped if it doesn't manage any file sync sessions, as to not run in the background unncessarily.

}
vpn.installSystemExtension()
fileSyncDaemon = MutagenDaemon(
mutagenPath: Bundle.main.url(forResource: "mutagen-darwin-arm64", withExtension: nil)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be CPU arch-specific?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True!

Copy link
Copy Markdown
Member

@ThomasK33 ThomasK33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if the platform-specific binary gets fetched, this can get merged.
No need to re-review.

Copy link
Copy Markdown
Member Author

ethanndickson commented Mar 24, 2025

Merge activity

  • Mar 24, 5:49 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 24, 5:49 AM EDT: A user merged this pull request with Graphite.

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