bump github.com/tribalwarshelp/shared
This commit is contained in:
parent
2a5a1d916c
commit
803dc9b9c2
|
@ -146,7 +146,7 @@ func (h *handler) getServers() ([]*models.Server, map[string]string, error) {
|
|||
}
|
||||
|
||||
if _, err := h.db.Model(&models.Server{}).
|
||||
Set("status = ?", models.ServerStatusClose).
|
||||
Set("status = ?", models.ServerStatusClosed).
|
||||
Where("key NOT IN (?)", pg.In(serverKeys)).
|
||||
Update(); err != nil {
|
||||
return nil, nil, err
|
||||
|
|
2
go.mod
2
go.mod
|
@ -8,6 +8,6 @@ require (
|
|||
github.com/joho/godotenv v1.3.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/tribalwarshelp/shared v0.0.0-20200602060635-0b3cb090edc5
|
||||
github.com/tribalwarshelp/shared v0.0.0-20200602122915-bb9a531672b6
|
||||
golang.org/x/net v0.0.0-20200528225125-3c3fba18258b // indirect
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -88,8 +88,8 @@ github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H
|
|||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs=
|
||||
github.com/tribalwarshelp/shared v0.0.0-20200602060635-0b3cb090edc5 h1:LeReuMU2zNi7tftm8nytrmkuD4BtLFUYZ3nlSZLE6ow=
|
||||
github.com/tribalwarshelp/shared v0.0.0-20200602060635-0b3cb090edc5/go.mod h1:tf+2yTHasV6jAF3V2deZ9slNoCyBzC0fMdTjI7clf6Y=
|
||||
github.com/tribalwarshelp/shared v0.0.0-20200602122915-bb9a531672b6 h1:vrqEpEwkKg63/hV5cIGgmDvdcAdDm4pR0N14nC3eCjQ=
|
||||
github.com/tribalwarshelp/shared v0.0.0-20200602122915-bb9a531672b6/go.mod h1:tf+2yTHasV6jAF3V2deZ9slNoCyBzC0fMdTjI7clf6Y=
|
||||
github.com/vmihailenco/bufpool v0.1.5/go.mod h1:fL9i/PRTuS7AELqAHwSU1Zf1c70xhkhGe/cD5ud9pJk=
|
||||
github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94=
|
||||
github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ=
|
||||
|
|
10
main.go
10
main.go
|
@ -5,7 +5,6 @@ import (
|
|||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/tribalwarshelp/shared/mode"
|
||||
|
||||
|
@ -26,11 +25,10 @@ func init() {
|
|||
|
||||
func main() {
|
||||
db := pg.Connect(&pg.Options{
|
||||
User: os.Getenv("DB_USER"),
|
||||
Password: os.Getenv("DB_PASSWORD"),
|
||||
Database: os.Getenv("DB_NAME"),
|
||||
Addr: os.Getenv("DB_HOST") + ":" + os.Getenv("DB_PORT"),
|
||||
PoolTimeout: 1 * time.Minute,
|
||||
User: os.Getenv("DB_USER"),
|
||||
Password: os.Getenv("DB_PASSWORD"),
|
||||
Database: os.Getenv("DB_NAME"),
|
||||
Addr: os.Getenv("DB_HOST") + ":" + os.Getenv("DB_PORT"),
|
||||
})
|
||||
defer func() {
|
||||
if err := db.Close(); err != nil {
|
||||
|
|
Reference in New Issue