-
Notifications
You must be signed in to change notification settings - Fork 46
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
chore: add output flag to sync status command #1010
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kasteph
changed the title
chore: add sync height command
chore: add height flag to stop command
Jun 26, 2022
kasteph
commented
Jun 26, 2022
iand
reviewed
Jun 27, 2022
placer14
suggested changes
Jun 27, 2022
frrist
reviewed
Jun 27, 2022
kasteph
force-pushed
the
kasteph/get-sync-height
branch
from
June 29, 2022 22:09
48276b3
to
80610ef
Compare
frrist
approved these changes
Jun 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} else { | ||
fmt.Printf("\tElapsed: %s\n", ss.End.Sub(ss.Start)) | ||
fmt.Printf(string(j) + "\n") | ||
case "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could call this "pretty" or "verbose" and set the default value of the --output
flag as such, but not a big deal
kasteph
changed the title
chore: add height flag to stop command
chore: add output flag to sync status command
Jun 30, 2022
kasteph
force-pushed
the
kasteph/get-sync-height
branch
from
June 30, 2022 09:09
80610ef
to
30fbe57
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
I frequently have to stop a Lily daemon manually when I do backfills or partial repository archiving work. Until filecoin-project/lotus#8641 is ready, I need to be able to have a way to determine what the latest height is.
Changes
This PR accepts a string flag to thestop
command that determines at the most recent height the given stage stopped. This allows me to use the height instdout
to be used as an input for next steps in the data pipeline.It accepts a bool flag to
sync
calledoutput
that would enable me to continuously poll the sync command with simple bash one-liners and check at what stage and what height it currently is at.e.g.