Skip to content

Commit

Permalink
add a flush statement
Browse files Browse the repository at this point in the history
  • Loading branch information
wogri committed Oct 24, 2023
1 parent 7ae132a commit 10c15b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,15 @@ func varroaHandler(w http.ResponseWriter, req *http.Request) {
Epoch: int64(time.Now().Unix()),
Scan: image}}

logger.Debug("Successfully received varroa image from bHive")
bBuffer.AppendVarroaImage(v)
w.WriteHeader(http.StatusOK)
logger.Debug("Successfully received varroa image from bHive",
"ip", req.RemoteAddr,
"bhive_id", bHiveID)
logger.Debug("Flushing varroa image to cloud", "api_server_address", *apiServerAddr)
poster := buffer.HttpPostClient{ApiServer: *apiServerAddr, Token: token}
bBuffer.Flush(poster)

}

Expand Down

0 comments on commit 10c15b5

Please sign in to comment.