Skip to content

Commit

Permalink
persisting protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumemichel committed Oct 17, 2024
1 parent 17751f9 commit b37af32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion queen.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ func (q *Queen) consumeAntsLogs(ctx context.Context) {
} else {
agent = peerstoreAgent.(string)
}
// protocols, _ := q.peerstore.GetProtocols(log.Requester)
protocols, _ := q.peerstore.GetProtocols(log.Requester)
protocolsStr := make([]string, len(protocols))
for i, p := range protocols {
protocolsStr[i] = string(p)
}

request := models.RequestsDenormalized{
RequestStartedAt: log.Timestamp,
Expand All @@ -228,6 +232,7 @@ func (q *Queen) consumeAntsLogs(ctx context.Context) {
KeyMultihash: log.Target.B58String(),
MultiAddresses: db.MaddrsToAddrs(maddrs),
AgentVersion: null.StringFrom(agent),
Protocols: protocolsStr,
}
requests = append(requests, request)
if len(requests) >= q.resolveBatchSize {
Expand Down

0 comments on commit b37af32

Please sign in to comment.