Skip to content

Commit

Permalink
Merge pull request #3 from 13rentgen/fix/annotations-order
Browse files Browse the repository at this point in the history
Correct annotations order
  • Loading branch information
zt-sv authored Apr 24, 2020
2 parents e8b0368 + 70a6fb0 commit fad542e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/grafana-annotations-bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ func main() {

lastScrapeTime = currTime

for _, annotation := range annotationsResps {
level.Info(logger).Log("msg", "get new annotation", "annotation", annotation)
annotationsChannel <- annotation
for i := len(annotationsResps) - 1; i >= 0; i-- {
level.Info(logger).Log("msg", "get new annotation", "annotation", annotationsResps[i])
annotationsChannel <- annotationsResps[i]
}

case <-quit:
Expand Down

0 comments on commit fad542e

Please sign in to comment.