diff --git a/cmd/createbookmark.go b/cmd/createbookmark.go index f97e820b..24209ff1 100644 --- a/cmd/createbookmark.go +++ b/cmd/createbookmark.go @@ -122,7 +122,7 @@ func CreateBookmark(signals chan os.Signal, ready chan bool) int { if err != nil { log.Infof("Error rendering bookmark: %v", err) } else { - log.Info(string(b)) + fmt.Println(string(b)) } return 0 diff --git a/cmd/request.go b/cmd/request.go index d770f5cc..26ab5f34 100644 --- a/cmd/request.go +++ b/cmd/request.go @@ -91,6 +91,7 @@ func Request(signals chan os.Signal, ready chan bool) int { // nolint: bodyclose // nhooyr.io/websocket reads the body internally c, _, err := websocket.Dial(ctx, gatewayUrl, options) if err != nil { + lf["gateway-url"] = gatewayUrl log.WithContext(ctx).WithFields(lf).WithError(err).Error("Failed to connect to overmind API") return 1 } @@ -342,8 +343,9 @@ func createInitialRequest() (*sdp.GatewayRequest, error) { msgID := uuid.New() req.RequestType = &sdp.GatewayRequest_LoadBookmark{ LoadBookmark: &sdp.LoadBookmark{ - UUID: bookmarkUUID[:], - MsgID: msgID[:], + UUID: bookmarkUUID[:], + MsgID: msgID[:], + IgnoreCache: viper.GetBool("ignore-cache"), }, } case "load-snapshot": @@ -374,6 +376,7 @@ func init() { requestCmd.PersistentFlags().String("query-type", "*", "The type to query") requestCmd.PersistentFlags().String("query", "", "The actual query to send") requestCmd.PersistentFlags().String("query-scope", "*", "The scope to query") + requestCmd.PersistentFlags().Bool("ignore-cache", false, "Set to true to ignore all caches in overmind.") requestCmd.PersistentFlags().String("bookmark-uuid", "", "The UUID of the bookmark to load") requestCmd.PersistentFlags().String("snapshot-uuid", "", "The UUID of the snapshot to load")