Skip to content

Commit cbf37c8

Browse files
author
Lei Mingyu
committedJan 20, 2020
修改缓存使用新key
1 parent 97bf511 commit cbf37c8

File tree

5 files changed

+100
-71
lines changed

5 files changed

+100
-71
lines changed
 

‎backend/main

-1.38 MB
Binary file not shown.

‎backend/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/gin-gonic/gin"
1313
"github.com/lozy219/trustscience/backend/matching"
1414
"github.com/lozy219/trustscience/backend/record"
15-
"github.com/mcuadros/go-gin-prometheus"
15+
ginprometheus "github.com/mcuadros/go-gin-prometheus"
1616
"github.com/prometheus/client_golang/prometheus"
1717
"github.com/prometheus/client_golang/prometheus/promauto"
1818
)

‎backend/record/record.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func timeToSlot(t time.Time) string {
3131

3232
func currentSlot() string {
3333
currentTime := time.Now()
34-
return timeToSlot(currentTime)
34+
return timeToSlotNew(currentTime)
3535
}
3636

3737
func currentSlotNew() string {
@@ -41,7 +41,7 @@ func currentSlotNew() string {
4141

4242
func previousSlot() string {
4343
prevTime := time.Now().Add(time.Duration(-2) * time.Hour)
44-
return timeToSlot(prevTime)
44+
return timeToSlotNew(prevTime)
4545
}
4646

4747
func previousSlotNew() string {

‎go.mod

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ module github.com/lozy219/trustscience
33
go 1.12
44

55
require (
6-
github.com/Depado/ginprom v1.2.0 // indirect
7-
github.com/corona10/goimagehash v1.0.1
6+
github.com/corona10/goimagehash v1.0.2
87
github.com/gin-contrib/cors v1.3.0
9-
github.com/gin-gonic/gin v1.4.0
10-
github.com/go-redis/redis v6.15.5+incompatible
11-
github.com/mcuadros/go-gin-prometheus v0.1.0 // indirect
12-
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
13-
github.com/onsi/ginkgo v1.10.1 // indirect
14-
github.com/onsi/gomega v1.7.0 // indirect
15-
github.com/sirupsen/logrus v1.4.2 // indirect
16-
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a
8+
github.com/gin-gonic/gin v1.5.0
9+
github.com/go-redis/redis v6.15.6+incompatible
10+
github.com/mcuadros/go-gin-prometheus v0.1.0
11+
github.com/onsi/ginkgo v1.11.0 // indirect
12+
github.com/onsi/gomega v1.8.1 // indirect
13+
github.com/prometheus/client_golang v1.3.0
14+
golang.org/x/image v0.0.0-20200119044424-58c23975cae1
1715
)

0 commit comments

Comments
 (0)