Browse Source

skip DB query if lead record is less than 1 day old.

master
Patrick Peng Sun 8 years ago
parent
commit
b372934a90
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      server.go

+ 7
- 0
server.go View File

return diff > 180 //3 minutes, 180 seconds return diff > 180 //3 minutes, 180 seconds
} }


func timestampOldThan(ts int32, sec int32) bool {
//diff > 3min from now
now := int32(time.Now().Unix())
diff := now - ts
return diff > sec
}

// func checkSignature1() bool { // func checkSignature1() bool {
// s1 := "e39de9f2e28079c01ebb4b803dfc3442b819545c" // s1 := "e39de9f2e28079c01ebb4b803dfc3442b819545c"
// t1 := "1492970761" // t1 := "1492970761"

Loading…
Cancel
Save