Skip to content

Commit

Permalink
fix conversion from proto to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed May 27, 2024
1 parent fffef5d commit 2e46f92
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions backend/schema/protobuf_dec.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ func metadataToSchema(s *schemapb.Metadata) Metadata {
Alias: s.Alias.Alias,
}

case *schemapb.Metadata_Retry:
var count *int
if s.Retry.Count != nil {
countValue := int(*s.Retry.Count)
count = &countValue
}
return &MetadataRetry{
Pos: posFromProto(s.Retry.Pos),
Count: count,
MinBackoff: s.Retry.MinBackoff,
MaxBackoff: s.Retry.MaxBackoff,
}

default:
panic(fmt.Sprintf("unhandled metadata type: %T", s))
}
Expand Down

0 comments on commit 2e46f92

Please sign in to comment.