mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-04 06:16:36 +08:00
取消查询缓存超时的设置
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user