Kaynağa Gözat

修改检测时间

lijian 6 yıl önce
ebeveyn
işleme
31685bd0e2
2 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 1 0
      pkg/models/product.go
  2. 3 3
      services/fileaccess/fileaccess.go

+ 1 - 0
pkg/models/product.go

@@ -22,6 +22,7 @@ type Product struct {
 	ProductConfig string `sql:"type:text; not null;"`
 	ProductConfig string `sql:"type:text; not null;"`
 	// icon of product
 	// icon of product
 	ProductImage string
 	ProductImage string
+	ProductType  int
 	Devices      []Device
 	Devices      []Device
 }
 }
 
 

+ 3 - 3
services/fileaccess/fileaccess.go

@@ -17,7 +17,7 @@ import (
 	"github.com/garyburd/redigo/redis"
 	"github.com/garyburd/redigo/redis"
 )
 )
 
 
-const checkTimeOut = 1 * time.Minute
+const checkTimeOut = 30 * time.Minute
 const tempFilesKey = "tempfilelist"
 const tempFilesKey = "tempfilelist"
 
 
 // FileAccess RPC服务
 // FileAccess RPC服务
@@ -28,7 +28,7 @@ type FileAccess struct {
 	redisHost string
 	redisHost string
 }
 }
 
 
-// 代表一个临时文件
+// 临时文件
 type tempFile struct {
 type tempFile struct {
 	//文件路径
 	//文件路径
 	FileName string
 	FileName string
@@ -141,7 +141,7 @@ func (f *FileAccess) checker() {
 				}
 				}
 			}
 			}
 		}
 		}
-		time.Sleep(30 * time.Second)
+		time.Sleep(15 * time.Minute)
 	}
 	}
 }
 }