Update service.go
This commit is contained in:
parent
3e4707ac80
commit
34e0326740
@ -721,7 +721,7 @@ func (h *Heruvym) PutFile(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TimeKey := fmt.Sprintf("sendLockHeruvym:%s", sess.Id)
|
TimeKey := fmt.Sprintf("sendLockHeruvym:%s", sess.Id)
|
||||||
isNewKey, err := h.redisClient.SetNX(r.Context(), TimeKey, time.Now().Unix(), 5*time.Minute).Result()
|
isNewKey, err := h.redisClient.SetNX(r.Context(), TimeKey, time.Now().Unix(), 30*time.Second).Result()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("failed check last upload time in Redis:", err)
|
fmt.Println("failed check last upload time in Redis:", err)
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
|
Loading…
Reference in New Issue
Block a user