Skip to content

Commit

Permalink
Merge pull request #42 from BenB196/staging
Browse files Browse the repository at this point in the history
Merge staging to master and bump to v0.1.3
  • Loading branch information
BenB196 committed Oct 10, 2019
2 parents 19204c8 + f2aae85 commit 443bedd
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.1.3
9 changes: 9 additions & 0 deletions docs/default_index_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@
"removableMediaBusType": {
"type": "keyword"
},
"removableMediaMediaName": {
"type": "keyword"
},
"removableMediaVolumeName": {
"type": "keyword"
},
"removableMediaPartitionId": {
"type": "keyword"
},
"syncDestination": {
"type": "keyword"
},
Expand Down
9 changes: 9 additions & 0 deletions docs/index_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@
"removableMediaBusType": {
"type": "keyword"
},
"removableMediaMediaName": {
"type": "keyword"
},
"removableMediaVolumeName": {
"type": "keyword"
},
"removableMediaPartitionId": {
"type": "keyword"
},
"syncDestination": {
"type": "keyword"
},
Expand Down
9 changes: 9 additions & 0 deletions elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ func BuildIndexPattern(elasticConfig config.Elasticsearch) string {
" \"removableMediaBusType\": {" +
" \"type\": \"keyword\"" +
" }," +
" \"removableMediaMediaName\": {" +
" \"type\": \"keyword\"" +
" }," +
" \"removableMediaVolumeName\": {" +
" \"type\": \"keyword\"" +
" }," +
" \"removableMediaPartitionId\": {" +
" \"type\": \"keyword\"" +
" }," +
" \"syncDestination\": {" +
" \"type\": \"keyword\"" +
" }," +
Expand Down
2 changes: 1 addition & 1 deletion ffsEvent/ffsEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,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")) || strings.Contains(err.Error(),"read: connection reset by peer") || strings.Contains(err.Error(),"POST: 400 Bad Request") {
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(),"PROTOCOL_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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/BenB196/crashplan-ffs-puller
go 1.12

require (
github.com/BenB196/crashplan-ffs-go-pkg v0.0.6
github.com/BenB196/crashplan-ffs-go-pkg v0.0.7
github.com/BenB196/ip-api-go-pkg v0.0.4
github.com/google/go-cmp v0.3.1
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ github.com/BenB196/crashplan-ffs-go-pkg v0.0.5 h1:ioDSdeFzIc7351h95qwTbL6tXkinDS
github.com/BenB196/crashplan-ffs-go-pkg v0.0.5/go.mod h1:oBwZ5/KfaNokjvI2Hn2e6c5801ir11FOCq4lG5PcniE=
github.com/BenB196/crashplan-ffs-go-pkg v0.0.6 h1:kZzkUpz2epVIgJJZSEsBYdEW2OhB2QfPLvtW7peP4WA=
github.com/BenB196/crashplan-ffs-go-pkg v0.0.6/go.mod h1:oBwZ5/KfaNokjvI2Hn2e6c5801ir11FOCq4lG5PcniE=
github.com/BenB196/crashplan-ffs-go-pkg v0.0.7 h1:gTd0tnrptsJ6krc04SC4v5ZEy0ys0jkBUe4QvsUyJZk=
github.com/BenB196/crashplan-ffs-go-pkg v0.0.7/go.mod h1:oBwZ5/KfaNokjvI2Hn2e6c5801ir11FOCq4lG5PcniE=
github.com/BenB196/ip-api-go-pkg v0.0.3 h1:FWmM7FkhT1N55jd4jPW7W9LVOQrG89DLlrgwMb5fosw=
github.com/BenB196/ip-api-go-pkg v0.0.3/go.mod h1:ccPdkBNnzf/uvuk7qXgEO06TCS/qILNJQP/KETQG4jU=
github.com/BenB196/ip-api-go-pkg v0.0.4 h1:BbWELxooG6l2gaXQ4i4gm6NsyikdbhalF+TKg08gDPQ=
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# github.com/BenB196/crashplan-ffs-go-pkg v0.0.6
# github.com/BenB196/crashplan-ffs-go-pkg v0.0.7
github.com/BenB196/crashplan-ffs-go-pkg
# github.com/BenB196/ip-api-go-pkg v0.0.4
github.com/BenB196/ip-api-go-pkg
Expand Down

0 comments on commit 443bedd

Please sign in to comment.