取消查询缓存超时的设置

This commit is contained in:
刘祥超
2022-03-20 16:12:49 +08:00
parent c2151e895d
commit 37f3e6fa2d

View File

@@ -132,9 +132,7 @@ func (this *FileList) Exist(hash string) (bool, error) {
return true, nil
}
ctx, cancelCtx := context.WithTimeout(context.Background(), 500*time.Millisecond)
rows, err := db.existsByHashStmt.QueryContext(ctx, hash, time.Now().Unix())
cancelCtx()
rows, err := db.existsByHashStmt.Query(hash, time.Now().Unix())
if err != nil {
if err == context.DeadlineExceeded {
return false, nil