Skip to content

Commit

Permalink
dropProbabilityを下げる
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarei committed Sep 4, 2021
1 parent fb2f1b5 commit b5583c4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions go/main.go
Expand Up @@ -8,7 +8,6 @@ import (
"errors"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"os"
"os/exec"
Expand Down Expand Up @@ -1166,10 +1165,10 @@ func getTrend(c echo.Context) error {
// ISUからのコンディションを受け取る
func postIsuCondition(c echo.Context) error {
// TODO: 一定割合リクエストを落としてしのぐようにしたが、本来は全量さばけるようにすべき
dropProbability := 0.9
if rand.Float64() <= dropProbability {
return c.NoContent(http.StatusAccepted)
}
//dropProbability := 0.9
//if rand.Float64() <= dropProbability {
// return c.NoContent(http.StatusAccepted)
//}

jiaIsuUUID := c.Param("jia_isu_uuid")
if jiaIsuUUID == "" {
Expand Down

0 comments on commit b5583c4

Please sign in to comment.