Skip to content

Commit

Permalink
Merge pull request #100 from hazcod/feat/warnings
Browse files Browse the repository at this point in the history
fix: do not skip one host during fetch
  • Loading branch information
hazcod authored Oct 23, 2023
2 parents ea0e609 + 94fb627 commit 56f1b13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/falcon/extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,12 @@ func GetMessages(config *config.Config, ctx context.Context) (results map[string
allHostDetails := make([]*models.DeviceapiDeviceSwagger, 0)

step := 100
sliceStart := 0
sliceEnd := sliceStart + step

for {
for sliceStart := 0; sliceStart < len(hostResult.Payload.Resources); sliceStart += step {
sliceEnd := sliceStart + step
if sliceEnd > len(hostResult.Payload.Resources) {
sliceEnd = len(hostResult.Payload.Resources)
}

if sliceEnd == len(hostResult.Payload.Resources)-1 {
break
Expand Down

0 comments on commit 56f1b13

Please sign in to comment.