Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out run_daemon and move to library #829

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Anviking
Copy link

To make it easier to test oura daemon in #823, we found it practical to split

// src/bin/oura/daemon.rs
pub fn run(args: &Args) -> Result<(), Error>

into:

// src/daemon/mod.rs
pub fn run_daemon(config: ConfigRoot) -> Result<Daemon, Error>

// src/bin/oura/run_daemon.rs
pub fn run(args: &Args) -> Result<(), Error>

to be able to start the daemon with having to first write a temporary config file to disk.

Factor out
```
pub fn run_daemon(config: ConfigRoot) -> Result<Daemon, Error>
```

from

```
pub fn run(args: &Args) -> Result<(), Error>
```

and move it to the library such that we can call it from tests.
src/bin/oura/run_daemon.rs Outdated Show resolved Hide resolved
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.

1 participant