Commit 522e8f66 by lzzzzl

rabbit消费测试

parent 8e4d1dd2
Showing with 3 additions and 2 deletions
...@@ -149,8 +149,9 @@ func RegxUrl(url string) (res int) { ...@@ -149,8 +149,9 @@ func RegxUrl(url string) (res int) {
func InsertLog(urls string, status string, urlType int) { func InsertLog(urls string, status string, urlType int) {
url := strings.Split(urls, "\n") url := strings.Split(urls, "\n")
fmt.Println(len(url)) if status == "" {
fmt.Println(status) status = "10"
}
for i := 0; i < len(url); i++ { for i := 0; i < len(url); i++ {
_, err1 := db.SeoDB.Exec("INSERT INTO lie_url_log (url,status,url_type,create_time) VALUES (?,?,?,?)", _, err1 := db.SeoDB.Exec("INSERT INTO lie_url_log (url,status,url_type,create_time) VALUES (?,?,?,?)",
url[i], status, urlType, time.Now().Unix()) url[i], status, urlType, time.Now().Unix())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment