Skip to content

Commit

Permalink
Merge pull request #36 from BenB196/staging
Browse files Browse the repository at this point in the history
Merge staging into master. Bump to v0.1.2
  • Loading branch information
BenB196 authored Oct 5, 2019
2 parents 8db8ce2 + 4ef0637 commit 19204c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.1.2
6 changes: 4 additions & 2 deletions ffsEvent/ffsEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
}

//increase in progress queries
promMetrics.IncreaseInProgressQueries()
if !retryQuery {
promMetrics.IncreaseInProgressQueries()
}

//Add query interval to in progress query list
inProgressQuery, err := getOnOrBeforeAndAfter(query)
Expand All @@ -233,7 +235,7 @@ func queryFetcher(query config.FFSQuery, inProgressQueries *[]eventOutput.InProg
if err != nil {
log.Println("error getting file events for ffs query: " + query.Name)
//check if recoverable errors are thrown
if strings.Contains(err.Error(),"Error with gathering file events POST: 500 Internal Server Error") || (strings.Contains(err.Error(),"stream error: stream ID") && strings.Contains(err.Error(),"INTERNAL_ERROR")) {
if strings.Contains(err.Error(),"Error with gathering file events POST: 500 Internal Server Error") || (strings.Contains(err.Error(),"stream error: stream ID") && strings.Contains(err.Error(),"INTERNAL_ERROR")) || strings.Contains(err.Error(),"read: connection reset by peer") || strings.Contains(err.Error(),"POST: 400 Bad Request") {
//allow for 10 retries before killing to save resource overload.
log.Println("Attempting to recover from error: " + err.Error() + ". Retry number: " + strconv.Itoa(retryCount))
if retryCount <= 10 {
Expand Down

0 comments on commit 19204c8

Please sign in to comment.