-
Notifications
You must be signed in to change notification settings - Fork 63
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
Manager node backend additions. #521
Manager node backend additions. #521
Conversation
cmd/apps/skychat/chat.go
Outdated
|
||
a, err := app.Setup(&app.Config{AppName: "skychat", AppVersion: "1.0", ProtocolVersion: "0.0.1"}) | ||
appName := "skychat" | ||
fmt.Println(os.Args) |
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.
Does this line have any purpose? Looks like it may be a forgotten debug print.
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.
Yes just a print, that I should remove when work on the PR is finished.
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.
Good stuff. Some comments.
pkg/app/log_store.go
Outdated
return logs, err | ||
} | ||
|
||
func iterateFromKey(c *bbolt.Cursor, logs *[]string) error { |
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.
@nkryuchkov How do you suggest we do this? And how should it be used in LogsSince
?
There are linter errors preventing the PR to pass tests on travis. Those errors belong to other packages and should be fixed in a different PR. |
Linter errors are fixed in skycoin/skywire#537 |
defer func() { | ||
err := db.Close() | ||
if err != nil { | ||
panic(err) |
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.
Is there a reason why panicking instead of returning an error is preferred here and in Store
method?
Run: func(_ *cobra.Command, args []string) { | ||
var t time.Time | ||
|
||
if args[1] == "beginning" { |
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.
What do you think of extracting the "beginning"
constant here?
pkg/hypervisor/hypervisor.go
Outdated
vh.Status = http.StatusOK | ||
} | ||
httputil.WriteJSON(w, r, http.StatusOK, vh) | ||
return |
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 we get rid of it? Looks redundant.
return m.withCtx(m.nodeCtx, func(w http.ResponseWriter, r *http.Request, ctx *httpCtx) { | ||
u, err := ctx.RPC.Uptime() | ||
if err != nil { | ||
httputil.WriteJSON(w, r, http.StatusInternalServerError, err) |
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.
I think we need a return statement here, because httputil.WriteJSON(w, r, http.StatusOK, u)
would be also executed.
What's the situation with this PR? |
It can be merged after conflicts are fixed |
Implements #226