Skip to content

Commit

Permalink
v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
danielb42 committed Oct 22, 2020
1 parent ae38ad6 commit c05b1b1
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 4 deletions.
Binary file removed artifacts/sensu-rri-write_v1.0.2_linux_amd64.tar.gz
Binary file not shown.
1 change: 0 additions & 1 deletion artifacts/sensu-rri-write_v1.0.2_sha512_checksums.txt

This file was deleted.

Binary file not shown.
1 change: 1 addition & 0 deletions artifacts/sensu-rri-write_v1.0.3_sha512_checksums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2f8b7f2fbda2a026539b893db04114353dc5d198095a191fd9b9f2c60657983e75e01548832227b95e81245f743368f0122b6b440eaa0ef3ef3883e46844d7f4 sensu-rri-write_v1.0.3_linux_amd64.tar.gz
Binary file modified bin/sensu-rri-write
Binary file not shown.
13 changes: 12 additions & 1 deletion cmd/sensu-rri-write/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ var (
timeBegin = time.Now()
rriClient *rri.Client
packrbox = packr.New("box", "../../orderfile")
fails int
)

func main() {
run()
}

func run() {

var err error
log.SetOutput(os.Stderr)
Expand All @@ -40,7 +45,6 @@ func main() {
if err != nil {
printFailMetricsAndExit("login failed:", err.Error())
}
defer rriClient.Logout() // nolint:errcheck

timeLoginDone := time.Now()

Expand Down Expand Up @@ -72,10 +76,17 @@ func main() {
"total", durationTotal,
timeBegin.Unix())

rriClient.Logout() // nolint:errcheck
os.Exit(0)
}

func printFailMetricsAndExit(errors ...string) {

if fails < 3 {
fails++
run()
}

errStr := "ERROR:"

for _, err := range errors {
Expand Down
4 changes: 2 additions & 2 deletions sensu/asset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ api_version: core/v2
metadata:
name: sensu-rri-write
spec:
sha512: d34facc20617fdfefef6d438f6e33291224a7422ca90dd62b8f2b885ea3213c0859c78b9139a523308eb0d6a786d1fdcae03be142e5d5d87a8edc666a7812d64
url: https://github.com/DENICeG/sensu-rri-write/releases/download/v1.0.2/sensu-rri-write_v1.0.2_linux_amd64.tar.gz
sha512: 2f8b7f2fbda2a026539b893db04114353dc5d198095a191fd9b9f2c60657983e75e01548832227b95e81245f743368f0122b6b440eaa0ef3ef3883e46844d7f4
url: https://github.com/DENICeG/sensu-rri-write/releases/download/v1.0.3/sensu-rri-write_v1.0.3_linux_amd64.tar.gz

0 comments on commit c05b1b1

Please sign in to comment.