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

fix: daemon help and config log #813

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions commands/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ Once the repository is initialized, start the daemon:
lily daemon --repo=<path> --config=<path>/config.toml

Visor will connect to the filecoin network and begin synchronizing with the
chain. To check the synchronization status use 'visor sync status' or
'visor sync wait'.
chain. To check the synchronization status use 'lily sync status' or
'lily sync wait'.

Jobs may be started on the daemon at any time. A watch job will wait for the
daemon to become synchronized before extracting data and will pause if the
daemon falls out of sync. Start a watch using 'visor watch'.
daemon falls out of sync. Start a watch using 'lily watch'.

A walk job will start immediately. Start a walk using 'visor walk'. A walk may
A walk job will start immediately. Start a walk using 'lily walk'. A walk may
only be performed between heights that have been synchronized with the network.

Note that jobs are not persisted between restarts of the daemon. See
'visor help job' for more information on managing jobs being run by the daemon.
'lily help job' for more information on managing jobs being run by the daemon.
`,

Flags: []cli.Flag{
Expand Down Expand Up @@ -189,11 +189,12 @@ Note that jobs are not persisted between restarts of the daemon. See
}

ctx := context.Background()
repoDir, err := homedir.Expand(daemonFlags.repo)
var err error
daemonFlags.repo, err = homedir.Expand(daemonFlags.repo)
if err != nil {
log.Warnw("could not expand repo location", "error", err)
} else {
log.Infof("visor repo: %s", repoDir)
log.Infof("lily repo: %s", daemonFlags.repo)
}

r, err := repo.NewFS(daemonFlags.repo)
Expand All @@ -202,13 +203,13 @@ Note that jobs are not persisted between restarts of the daemon. See
}

if daemonFlags.config == "" {
daemonFlags.config = filepath.Join(repoDir, "config.toml")
daemonFlags.config = filepath.Join(daemonFlags.repo, "config.toml")
} else {
daemonFlags.config, err = homedir.Expand(daemonFlags.config)
if err != nil {
log.Warnw("could not expand repo location", "error", err)
} else {
log.Infof("visor config: %s", repoDir)
log.Infof("lily config: %s", daemonFlags.config)
}
}

Expand Down