Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Dawid Wysokiński | 1c1758ce7d | |
Dawid Wysokiński | d05d7aaacb | |
Dawid Wysokiński | 68b715306d | |
Dawid Wysokiński | 21e530aa0f | |
Dawid Wysokiński | be824acaec | |
Dawid Wysokiński | 3fe539db19 | |
Renovate | 24b8ffd32c | |
Dawid Wysokiński | 03e0e4149b |
|
@ -57,10 +57,12 @@ linters:
|
|||
- inamedparam
|
||||
- sloglint
|
||||
- revive
|
||||
- gomnd
|
||||
- mnd
|
||||
- forbidigo
|
||||
- copyloopvar
|
||||
- intrange
|
||||
- fatcontext
|
||||
- canonicalheader
|
||||
|
||||
linters-settings:
|
||||
gocyclo:
|
||||
|
@ -123,7 +125,7 @@ linters-settings:
|
|||
enable-all: true
|
||||
sloglint:
|
||||
attr-only: true
|
||||
gomnd:
|
||||
mnd:
|
||||
ignored-functions:
|
||||
- strconv.FormatInt
|
||||
- strconv.ParseInt
|
||||
|
@ -507,7 +509,7 @@ issues:
|
|||
text: add-constant
|
||||
- path: bun/migrations
|
||||
linters:
|
||||
- gochecknoinits
|
||||
- init
|
||||
- linters:
|
||||
- lll
|
||||
source: "^//go:generate "
|
||||
|
|
|
@ -6,7 +6,7 @@ repos:
|
|||
stages: [commit-msg]
|
||||
additional_dependencies: ["@commitlint/config-conventional"]
|
||||
- repo: https://github.com/golangci/golangci-lint
|
||||
rev: v1.57.2
|
||||
rev: v1.58.0
|
||||
hooks:
|
||||
- id: golangci-lint
|
||||
- repo: https://github.com/hadolint/hadolint
|
||||
|
|
|
@ -42,7 +42,7 @@ steps:
|
|||
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
lint:
|
||||
image: golangci/golangci-lint:v1.57
|
||||
image: golangci/golangci-lint:v1.58
|
||||
pull: true
|
||||
depends_on:
|
||||
- generate
|
||||
|
|
2
Makefile
2
Makefile
|
@ -16,7 +16,7 @@ install-git-hooks:
|
|||
.PHONY: install-golangci-lint
|
||||
install-golangci-lint:
|
||||
@echo "Installing github.com/golangci/golangci-lint..."
|
||||
@(test -f $(GOLANGCI_LINT_PATH) && echo "github.com/golangci/golangci-lint is already installed. Skipping...") || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.57.2
|
||||
@(test -f $(GOLANGCI_LINT_PATH) && echo "github.com/golangci/golangci-lint is already installed. Skipping...") || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.58.0
|
||||
|
||||
.PHONY: install-oapi-codegen
|
||||
install-oapi-codegen:
|
||||
|
|
|
@ -23,30 +23,30 @@ var (
|
|||
}
|
||||
dbFlagMaxIdleConns = &cli.IntFlag{
|
||||
Name: "db.maxIdleConns",
|
||||
Value: 2, //nolint:gomnd
|
||||
Value: 2, //nolint:mnd
|
||||
EnvVars: []string{"DB_MAX_IDLE_CONNS"},
|
||||
Usage: "https://pkg.go.dev/database/sql#DB.SetMaxIdleConns",
|
||||
}
|
||||
dbFlagMaxOpenConns = &cli.IntFlag{
|
||||
Name: "db.maxOpenConns",
|
||||
Value: runtime.NumCPU() * 4, //nolint:gomnd
|
||||
Value: runtime.NumCPU() * 4, //nolint:mnd
|
||||
EnvVars: []string{"DB_MAX_OPEN_CONNS"},
|
||||
Usage: "https://pkg.go.dev/database/sql#DB.SetMaxOpenConns",
|
||||
}
|
||||
dbFlagConnMaxLifetime = &cli.DurationFlag{
|
||||
Name: "db.connMaxLifetime",
|
||||
Value: 30 * time.Minute, //nolint:gomnd
|
||||
Value: 30 * time.Minute, //nolint:mnd
|
||||
EnvVars: []string{"DB_CONN_MAX_LIFETIME"},
|
||||
Usage: "https://pkg.go.dev/database/sql#DB.SetConnMaxLifetime",
|
||||
}
|
||||
dbFlagReadTimeout = &cli.DurationFlag{
|
||||
Name: "db.readTimeout",
|
||||
Value: 10 * time.Second, //nolint:gomnd
|
||||
Value: 10 * time.Second, //nolint:mnd
|
||||
EnvVars: []string{"DB_READ_TIMEOUT"},
|
||||
}
|
||||
dbFlagWriteTimeout = &cli.DurationFlag{
|
||||
Name: "db.writeTimeout",
|
||||
Value: 5 * time.Second, //nolint:gomnd
|
||||
Value: 5 * time.Second, //nolint:mnd
|
||||
EnvVars: []string{"DB_WRITE_TIMEOUT"},
|
||||
}
|
||||
dbFlags = []cli.Flag{
|
||||
|
|
|
@ -299,18 +299,9 @@ type registerConsumerHandlersFunc func(
|
|||
|
||||
//nolint:gocyclo
|
||||
func runConsumer(c *cli.Context, name string, registerHandlers registerConsumerHandlersFunc) error {
|
||||
ctx, cancel := context.WithCancel(c.Context)
|
||||
defer cancel()
|
||||
|
||||
logger := loggerFromCtx(ctx)
|
||||
logger := loggerFromCtx(c.Context)
|
||||
watermillLogger := newWatermillLogger(logger)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
defer func() {
|
||||
// it's required for the graceful shutdown
|
||||
wg.Wait()
|
||||
}()
|
||||
|
||||
amqpConn, err := newAMQPConnectionFromFlags(c, watermillLogger)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -347,13 +338,6 @@ func runConsumer(c *cli.Context, name string, registerHandlers registerConsumerH
|
|||
}
|
||||
defer closeBunDB(bunDB, logger)
|
||||
|
||||
healthObserver := healthfile.LiveObserver(health.New(), "/tmp/live")
|
||||
defer func() {
|
||||
if closeErr := healthObserver.Close(); closeErr != nil {
|
||||
logger.Warn("couldn't close health observer", slog.Any("error", closeErr))
|
||||
}
|
||||
}()
|
||||
|
||||
router, err := newWatermillRouter(watermillLogger)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -371,6 +355,22 @@ func runConsumer(c *cli.Context, name string, registerHandlers registerConsumerH
|
|||
return err
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(c.Context)
|
||||
defer cancel()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
defer func() {
|
||||
// it's required for the graceful shutdown
|
||||
wg.Wait()
|
||||
}()
|
||||
|
||||
healthObserver := healthfile.LiveObserver(health.New(), "/tmp/live")
|
||||
defer func() {
|
||||
if closeErr := healthObserver.Close(); closeErr != nil {
|
||||
logger.Warn("couldn't close health observer", slog.Any("error", closeErr))
|
||||
}
|
||||
}()
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
@ -391,7 +391,7 @@ func runConsumer(c *cli.Context, name string, registerHandlers registerConsumerH
|
|||
logger.Info("consumer is up and running", slog.String("name", name))
|
||||
}
|
||||
|
||||
waitForShutdownSignal(ctx)
|
||||
waitForShutdownSignal(ctx, logger)
|
||||
|
||||
if closeErr := router.Close(); closeErr != nil {
|
||||
logger.Warn("couldn't close router", slog.Any("error", err))
|
||||
|
|
|
@ -23,66 +23,66 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
apiServerPortFlag = &cli.UintFlag{
|
||||
apiServerFlagPort = &cli.UintFlag{
|
||||
Name: "api.port",
|
||||
EnvVars: []string{"API_PORT"},
|
||||
Value: 9234, //nolint:gomnd
|
||||
Value: 9234, //nolint:mnd
|
||||
}
|
||||
apiServerHandlerTimeoutFlag = &cli.DurationFlag{
|
||||
apiServerFlagHandlerTimeout = &cli.DurationFlag{
|
||||
Name: "api.handlerTimeout",
|
||||
EnvVars: []string{"API_HANDLER_TIMEOUT"},
|
||||
Value: 5 * time.Second, //nolint:gomnd
|
||||
Value: 5 * time.Second, //nolint:mnd
|
||||
Usage: "https://pkg.go.dev/net/http#TimeoutHandler",
|
||||
}
|
||||
apiServerReadTimeoutFlag = &cli.DurationFlag{
|
||||
apiServerFlagReadTimeout = &cli.DurationFlag{
|
||||
Name: "api.readTimeout",
|
||||
EnvVars: []string{"API_READ_TIMEOUT"},
|
||||
Value: 5 * time.Second, //nolint:gomnd
|
||||
Value: 5 * time.Second, //nolint:mnd
|
||||
}
|
||||
apiServerReadHeaderTimeoutFlag = &cli.DurationFlag{
|
||||
apiServerFlagReadHeaderTimeout = &cli.DurationFlag{
|
||||
Name: "api.readHeaderTimeout",
|
||||
EnvVars: []string{"API_READ_HEADER_TIMEOUT"},
|
||||
Value: time.Second,
|
||||
}
|
||||
apiServerWriteTimeoutFlag = &cli.DurationFlag{
|
||||
apiServerFlagWriteTimeout = &cli.DurationFlag{
|
||||
Name: "api.writeTimeout",
|
||||
EnvVars: []string{"API_WRITE_TIMEOUT"},
|
||||
Value: 10 * time.Second, //nolint:gomnd
|
||||
Value: 10 * time.Second, //nolint:mnd
|
||||
}
|
||||
apiServerIdleTimeoutFlag = &cli.DurationFlag{
|
||||
apiServerFlagIdleTimeout = &cli.DurationFlag{
|
||||
Name: "api.idleTimeout",
|
||||
EnvVars: []string{"API_IDLE_TIMEOUT"},
|
||||
Value: 180 * time.Second, //nolint:gomnd
|
||||
Value: 180 * time.Second, //nolint:mnd
|
||||
}
|
||||
apiServerShutdownTimeoutFlag = &cli.DurationFlag{
|
||||
apiServerFlagShutdownTimeout = &cli.DurationFlag{
|
||||
Name: "api.shutdownTimeout",
|
||||
EnvVars: []string{"API_SHUTDOWN_TIMEOUT"},
|
||||
Value: 10 * time.Second, //nolint:gomnd
|
||||
Value: 10 * time.Second, //nolint:mnd
|
||||
}
|
||||
apiServerOpenAPIEnabledFlag = &cli.BoolFlag{
|
||||
apiServerFlagOpenAPIEnabled = &cli.BoolFlag{
|
||||
Name: "api.openApi.enabled",
|
||||
EnvVars: []string{"API_OPENAPI_ENABLED"},
|
||||
Value: true,
|
||||
}
|
||||
apiServerOpenAPISwaggerEnabledFlag = &cli.BoolFlag{
|
||||
apiServerFlagOpenAPISwaggerEnabled = &cli.BoolFlag{
|
||||
Name: "api.openApi.swaggerEnabled",
|
||||
EnvVars: []string{"API_OPENAPI_SWAGGER_ENABLED"},
|
||||
Value: true,
|
||||
}
|
||||
apiServerOpenAPIServersFlag = &cli.StringSliceFlag{
|
||||
apiServerFlagOpenAPIServers = &cli.StringSliceFlag{
|
||||
Name: "api.openApi.servers",
|
||||
EnvVars: []string{"API_OPENAPI_SERVERS"},
|
||||
}
|
||||
apiServerFlags = []cli.Flag{
|
||||
apiServerPortFlag,
|
||||
apiServerHandlerTimeoutFlag,
|
||||
apiServerReadTimeoutFlag,
|
||||
apiServerReadHeaderTimeoutFlag,
|
||||
apiServerWriteTimeoutFlag,
|
||||
apiServerIdleTimeoutFlag,
|
||||
apiServerOpenAPIEnabledFlag,
|
||||
apiServerOpenAPISwaggerEnabledFlag,
|
||||
apiServerOpenAPIServersFlag,
|
||||
apiServerFlagPort,
|
||||
apiServerFlagHandlerTimeout,
|
||||
apiServerFlagReadTimeout,
|
||||
apiServerFlagReadHeaderTimeout,
|
||||
apiServerFlagWriteTimeout,
|
||||
apiServerFlagIdleTimeout,
|
||||
apiServerFlagOpenAPIEnabled,
|
||||
apiServerFlagOpenAPISwaggerEnabled,
|
||||
apiServerFlagOpenAPIServers,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -132,11 +132,11 @@ var cmdServe = &cli.Command{
|
|||
|
||||
server, err := newHTTPServer(
|
||||
httpServerConfig{
|
||||
port: c.Uint(apiServerPortFlag.Name),
|
||||
readTimeout: c.Duration(apiServerReadTimeoutFlag.Name),
|
||||
readHeaderTimeout: c.Duration(apiServerReadHeaderTimeoutFlag.Name),
|
||||
writeTimeout: c.Duration(apiServerWriteTimeoutFlag.Name),
|
||||
idleTimeout: c.Duration(apiServerIdleTimeoutFlag.Name),
|
||||
port: c.Uint(apiServerFlagPort.Name),
|
||||
readTimeout: c.Duration(apiServerFlagReadTimeout.Name),
|
||||
readHeaderTimeout: c.Duration(apiServerFlagReadHeaderTimeout.Name),
|
||||
writeTimeout: c.Duration(apiServerFlagWriteTimeout.Name),
|
||||
idleTimeout: c.Duration(apiServerFlagIdleTimeout.Name),
|
||||
},
|
||||
func(r chi.Router) error {
|
||||
oapiCfg, oapiCfgErr := newOpenAPIConfigFromFlags(c)
|
||||
|
@ -175,11 +175,9 @@ var cmdServe = &cli.Command{
|
|||
|
||||
idleConnsClosed := make(chan struct{})
|
||||
go func() {
|
||||
waitForShutdownSignal(c.Context)
|
||||
waitForShutdownSignal(c.Context, logger)
|
||||
|
||||
logger.Debug("received shutdown signal")
|
||||
|
||||
ctx, cancel := context.WithTimeout(c.Context, c.Duration(apiServerShutdownTimeoutFlag.Name))
|
||||
ctx, cancel := context.WithTimeout(c.Context, c.Duration(apiServerFlagShutdownTimeout.Name))
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
|
@ -202,7 +200,7 @@ var cmdServe = &cli.Command{
|
|||
}
|
||||
|
||||
func newOpenAPIConfigFromFlags(c *cli.Context) (port.OpenAPIConfig, error) {
|
||||
rawURLs := c.StringSlice(apiServerOpenAPIServersFlag.Name)
|
||||
rawURLs := c.StringSlice(apiServerFlagOpenAPIServers.Name)
|
||||
|
||||
servers := make([]port.OpenAPIConfigServer, 0, len(rawURLs))
|
||||
|
||||
|
@ -218,8 +216,8 @@ func newOpenAPIConfigFromFlags(c *cli.Context) (port.OpenAPIConfig, error) {
|
|||
}
|
||||
|
||||
return port.OpenAPIConfig{
|
||||
Enabled: c.Bool(apiServerOpenAPIEnabledFlag.Name),
|
||||
SwaggerEnabled: c.Bool(apiServerOpenAPISwaggerEnabledFlag.Name),
|
||||
Enabled: c.Bool(apiServerFlagOpenAPIEnabled.Name),
|
||||
SwaggerEnabled: c.Bool(apiServerFlagOpenAPISwaggerEnabled.Name),
|
||||
BasePath: apiBasePath,
|
||||
Servers: servers,
|
||||
}, nil
|
||||
|
@ -239,7 +237,7 @@ func newAPIMiddlewares(c *cli.Context, logger *slog.Logger) chi.Middlewares {
|
|||
})),
|
||||
middleware.Recoverer,
|
||||
func(next http.Handler) http.Handler {
|
||||
return http.TimeoutHandler(next, c.Duration(apiServerHandlerTimeoutFlag.Name), "Timeout")
|
||||
return http.TimeoutHandler(next, c.Duration(apiServerFlagHandlerTimeout.Name), "Timeout")
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
const appName = "wendia"
|
||||
const appName = "twhelp"
|
||||
|
||||
// this flag will be set by the build flags
|
||||
var version = "development"
|
||||
|
|
|
@ -20,7 +20,7 @@ var (
|
|||
}
|
||||
twSvcFlagTimeout = &cli.DurationFlag{
|
||||
Name: "tw.timeout",
|
||||
Value: 10 * time.Second, //nolint:gomnd
|
||||
Value: 10 * time.Second, //nolint:mnd
|
||||
EnvVars: []string{"TW_TIMEOUT"},
|
||||
Usage: "https://pkg.go.dev/net/http#Client.Timeout",
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
@ -15,8 +16,9 @@ func newShutdownSignalContext(parent context.Context) (context.Context, context.
|
|||
return signal.NotifyContext(parent, shutdownSignals...)
|
||||
}
|
||||
|
||||
func waitForShutdownSignal(ctx context.Context) {
|
||||
func waitForShutdownSignal(ctx context.Context, logger *slog.Logger) {
|
||||
ctx, cancel := newShutdownSignalContext(ctx)
|
||||
defer cancel()
|
||||
<-ctx.Done()
|
||||
logger.Debug("received shutdown signal")
|
||||
}
|
||||
|
|
8
go.mod
8
go.mod
|
@ -10,7 +10,7 @@ require (
|
|||
github.com/cenkalti/backoff/v4 v4.3.0
|
||||
github.com/elliotchance/phpserialize v1.4.0
|
||||
github.com/ettle/strcase v0.2.0
|
||||
github.com/getkin/kin-openapi v0.123.0
|
||||
github.com/getkin/kin-openapi v0.124.0
|
||||
github.com/go-chi/chi/v5 v5.0.12
|
||||
github.com/go-chi/render v1.0.3
|
||||
github.com/google/go-cmp v0.6.0
|
||||
|
@ -26,7 +26,7 @@ require (
|
|||
github.com/uptrace/bun/driver/pgdriver v1.2.1
|
||||
github.com/uptrace/bun/driver/sqliteshim v1.2.1
|
||||
github.com/uptrace/bun/extra/bundebug v1.2.1
|
||||
github.com/urfave/cli/v2 v2.27.1
|
||||
github.com/urfave/cli/v2 v2.27.2
|
||||
go.uber.org/automaxprocs v1.5.3
|
||||
golang.org/x/sync v0.7.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
|
@ -40,7 +40,7 @@ require (
|
|||
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
||||
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
|
||||
github.com/containerd/continuity v0.3.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/docker/cli v20.10.17+incompatible // indirect
|
||||
github.com/docker/docker v20.10.7+incompatible // indirect
|
||||
|
@ -86,7 +86,7 @@ require (
|
|||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/mod v0.16.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
|
|
16
go.sum
16
go.sum
|
@ -30,8 +30,8 @@ github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvA
|
|||
github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
|
||||
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
|
@ -55,8 +55,8 @@ github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp
|
|||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
||||
github.com/getkin/kin-openapi v0.123.0 h1:zIik0mRwFNLyvtXK274Q6ut+dPh6nlxBp0x7mNrPhs8=
|
||||
github.com/getkin/kin-openapi v0.123.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
|
||||
github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M=
|
||||
github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
|
||||
github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
|
||||
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
|
||||
|
@ -206,8 +206,8 @@ github.com/uptrace/bun/driver/sqliteshim v1.2.1/go.mod h1:oJtOPSCDdDHgNw/0jwIGr+
|
|||
github.com/uptrace/bun/extra/bundebug v1.2.1 h1:85MYpX3QESYI02YerKxUi1CD9mHuLrc2BXs1eOCtQus=
|
||||
github.com/uptrace/bun/extra/bundebug v1.2.1/go.mod h1:sfGKIi0HSGxsTC/sgIHGwpnYduHHYhdMeOIwurgSY+Y=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
|
||||
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
|
||||
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
|
||||
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
|
||||
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
|
||||
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
|
||||
|
@ -220,8 +220,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
|
|||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
|
||||
|
|
|
@ -131,8 +131,7 @@ func (a updateServerParamsApplier) apply(q *bun.UpdateQuery) *bun.UpdateQuery {
|
|||
}
|
||||
|
||||
if tribeDataSyncedAt := a.params.TribeDataSyncedAt(); tribeDataSyncedAt.Valid {
|
||||
// TODO: rename this column to tribe_data_synced_at
|
||||
q = q.Set("tribe_data_updated_at = ?", tribeDataSyncedAt.V)
|
||||
q = q.Set("tribe_data_synced_at = ?", tribeDataSyncedAt.V)
|
||||
}
|
||||
|
||||
if numPlayers := a.params.NumPlayers(); numPlayers.Valid {
|
||||
|
@ -140,8 +139,7 @@ func (a updateServerParamsApplier) apply(q *bun.UpdateQuery) *bun.UpdateQuery {
|
|||
}
|
||||
|
||||
if playerDataSyncedAt := a.params.PlayerDataSyncedAt(); playerDataSyncedAt.Valid {
|
||||
// TODO: rename this column to player_data_synced_at
|
||||
q = q.Set("player_data_updated_at = ?", playerDataSyncedAt.V)
|
||||
q = q.Set("player_data_synced_at = ?", playerDataSyncedAt.V)
|
||||
}
|
||||
|
||||
if numVillages := a.params.NumVillages(); numVillages.Valid {
|
||||
|
@ -161,13 +159,11 @@ func (a updateServerParamsApplier) apply(q *bun.UpdateQuery) *bun.UpdateQuery {
|
|||
}
|
||||
|
||||
if villageDataSyncedAt := a.params.VillageDataSyncedAt(); villageDataSyncedAt.Valid {
|
||||
// TODO: rename this column to village_data_synced_at
|
||||
q = q.Set("village_data_updated_at = ?", villageDataSyncedAt.V)
|
||||
q = q.Set("village_data_synced_at = ?", villageDataSyncedAt.V)
|
||||
}
|
||||
|
||||
if ennoblementDataSyncedAt := a.params.EnnoblementDataSyncedAt(); ennoblementDataSyncedAt.Valid {
|
||||
// TODO: rename this column to ennoblement_data_synced_at
|
||||
q = q.Set("ennoblement_data_updated_at = ?", ennoblementDataSyncedAt.V)
|
||||
q = q.Set("ennoblement_data_synced_at = ?", ennoblementDataSyncedAt.V)
|
||||
}
|
||||
|
||||
if tribeSnapshotsCreatedAt := a.params.TribeSnapshotsCreatedAt(); tribeSnapshotsCreatedAt.Valid {
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
num_barbarian_villages: 1180
|
||||
num_bonus_villages: 512
|
||||
created_at: 2022-03-19T12:00:54.000Z
|
||||
player_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
player_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:00:54.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:00:54.000Z
|
||||
village_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
village_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
version_code: de
|
||||
- _id: en113
|
||||
key: en113
|
||||
|
@ -31,12 +31,12 @@
|
|||
num_barbarian_villages: 700
|
||||
num_bonus_villages: 1024
|
||||
created_at: 2021-04-02T16:01:25.000Z
|
||||
player_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
player_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
player_snapshots_created_at: 2021-04-02T16:01:25.000Z
|
||||
tribe_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
tribe_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
tribe_snapshots_created_at: 2021-04-02T16:01:25.000Z
|
||||
village_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
ennoblement_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
village_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
ennoblement_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
version_code: en
|
||||
- _id: it70
|
||||
key: it70
|
||||
|
@ -50,12 +50,12 @@
|
|||
num_barbarian_villages: 1682
|
||||
num_bonus_villages: 256
|
||||
created_at: 2022-03-19T12:00:04.000Z
|
||||
player_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
player_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:00:04.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:00:04.000Z
|
||||
village_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
village_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
version_code: it
|
||||
- _id: pl169
|
||||
key: pl169
|
||||
|
@ -69,12 +69,12 @@
|
|||
num_barbarian_villages: 1574
|
||||
num_bonus_villages: 2048
|
||||
created_at: 2022-03-19T12:01:39.000Z
|
||||
player_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
player_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:01:39.000Z
|
||||
village_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
village_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
version_code: pl
|
||||
- model: Tribe
|
||||
rows:
|
||||
|
|
|
@ -11,32 +11,28 @@ import (
|
|||
var ServerMetaColumns = []string{"key", "url", "open"}
|
||||
|
||||
type Server struct {
|
||||
bun.BaseModel `bun:"table:servers,alias:server"`
|
||||
Key string `bun:"key,nullzero,pk"`
|
||||
URL string `bun:"url,nullzero"`
|
||||
Open bool `bun:"open"`
|
||||
Special bool `bun:"special"`
|
||||
NumPlayers int `bun:"num_players"`
|
||||
NumTribes int `bun:"num_tribes"`
|
||||
NumVillages int `bun:"num_villages"`
|
||||
NumPlayerVillages int `bun:"num_player_villages"`
|
||||
NumBarbarianVillages int `bun:"num_barbarian_villages"`
|
||||
NumBonusVillages int `bun:"num_bonus_villages"`
|
||||
Config ServerConfig `bun:"config"`
|
||||
BuildingInfo BuildingInfo `bun:"building_info"`
|
||||
UnitInfo UnitInfo `bun:"unit_info"`
|
||||
CreatedAt time.Time `bun:"created_at,nullzero"`
|
||||
// TODO: rename this column to player_data_synced_at
|
||||
PlayerDataUpdatedAt time.Time `bun:"player_data_updated_at,nullzero"`
|
||||
PlayerSnapshotsCreatedAt time.Time `bun:"player_snapshots_created_at,nullzero"`
|
||||
// TODO: rename this column to tribe_data_synced_at
|
||||
TribeDataUpdatedAt time.Time `bun:"tribe_data_updated_at,nullzero"`
|
||||
TribeSnapshotsCreatedAt time.Time `bun:"tribe_snapshots_created_at,nullzero"`
|
||||
// TODO: rename this column to village_data_synced_at
|
||||
VillageDataUpdatedAt time.Time `bun:"village_data_updated_at,nullzero"`
|
||||
// TODO: rename this column to ennoblement_data_synced_at
|
||||
EnnoblementDataUpdatedAt time.Time `bun:"ennoblement_data_updated_at,nullzero"`
|
||||
VersionCode string `bun:"version_code,nullzero"`
|
||||
bun.BaseModel `bun:"table:servers,alias:server"`
|
||||
Key string `bun:"key,nullzero,pk"`
|
||||
URL string `bun:"url,nullzero"`
|
||||
Open bool `bun:"open"`
|
||||
Special bool `bun:"special"`
|
||||
NumPlayers int `bun:"num_players"`
|
||||
NumTribes int `bun:"num_tribes"`
|
||||
NumVillages int `bun:"num_villages"`
|
||||
NumPlayerVillages int `bun:"num_player_villages"`
|
||||
NumBarbarianVillages int `bun:"num_barbarian_villages"`
|
||||
NumBonusVillages int `bun:"num_bonus_villages"`
|
||||
Config ServerConfig `bun:"config"`
|
||||
BuildingInfo BuildingInfo `bun:"building_info"`
|
||||
UnitInfo UnitInfo `bun:"unit_info"`
|
||||
CreatedAt time.Time `bun:"created_at,nullzero"`
|
||||
PlayerDataUpdatedAt time.Time `bun:"player_data_synced_at,nullzero"`
|
||||
PlayerSnapshotsCreatedAt time.Time `bun:"player_snapshots_created_at,nullzero"`
|
||||
TribeDataUpdatedAt time.Time `bun:"tribe_data_synced_at,nullzero"`
|
||||
TribeSnapshotsCreatedAt time.Time `bun:"tribe_snapshots_created_at,nullzero"`
|
||||
VillageDataUpdatedAt time.Time `bun:"village_data_synced_at,nullzero"`
|
||||
EnnoblementDataUpdatedAt time.Time `bun:"ennoblement_data_synced_at,nullzero"`
|
||||
VersionCode string `bun:"version_code,nullzero"`
|
||||
}
|
||||
|
||||
func (s Server) ToDomain() (domain.Server, error) {
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package migrations
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
func init() {
|
||||
migrations.MustRegister(func(ctx context.Context, db *bun.DB) error {
|
||||
return db.RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error {
|
||||
for oldColumn, newColumn := range getColumnsToRename20240504051104() {
|
||||
_, err := tx.ExecContext(ctx, "ALTER TABLE servers RENAME COLUMN ? TO ?", bun.Safe(oldColumn), bun.Safe(newColumn))
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: %w", oldColumn, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}, func(ctx context.Context, db *bun.DB) error {
|
||||
return db.RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error {
|
||||
for oldColumn, newColumn := range getColumnsToRename20240504051104() {
|
||||
_, err := tx.ExecContext(ctx, "ALTER TABLE servers RENAME COLUMN ? TO ?", bun.Safe(newColumn), bun.Safe(oldColumn))
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: %w", newColumn, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func getColumnsToRename20240504051104() map[string]string {
|
||||
return map[string]string{
|
||||
"player_data_updated_at": "player_data_synced_at",
|
||||
"tribe_data_updated_at": "tribe_data_synced_at",
|
||||
"village_data_updated_at": "village_data_synced_at",
|
||||
"ennoblement_data_updated_at": "ennoblement_data_synced_at",
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ func Logger(logger Slogger, opts ...Option) func(next http.Handler) http.Handler
|
|||
slog.String("httpRequest.ip", cfg.ipExtractor(r)),
|
||||
slog.Int("httpResponse.status", status),
|
||||
slog.Int("httpResponse.bytes", ww.BytesWritten()),
|
||||
//nolint:gomnd
|
||||
//nolint:mnd
|
||||
slog.Float64("httpResponse.duration", float64(end.Sub(start).Nanoseconds())/1000000.0), // in milliseconds
|
||||
)
|
||||
})
|
||||
|
|
|
@ -6,6 +6,10 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func RandVersionCode() string {
|
||||
return gofakeit.LetterN(2)
|
||||
}
|
||||
|
||||
type VersionCursorConfig struct {
|
||||
Code string
|
||||
}
|
||||
|
@ -52,7 +56,3 @@ func NewVersion(tb TestingTB, opts ...func(cfg *VersionConfig)) domain.Version {
|
|||
|
||||
return v
|
||||
}
|
||||
|
||||
func RandVersionCode() string {
|
||||
return gofakeit.LetterN(2)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ type Version struct {
|
|||
timezone string
|
||||
}
|
||||
|
||||
var versionModelName = "Version"
|
||||
const versionModelName = "Version"
|
||||
|
||||
// UnmarshalVersionFromDatabase unmarshals Version from the database.
|
||||
//
|
||||
|
|
|
@ -148,7 +148,6 @@ func (re apiErrorRenderer) domainErrorToAPIError(domainErr domain.Error) apiErro
|
|||
var err error = domainErr
|
||||
for {
|
||||
var withPath domain.ErrorWithPath
|
||||
|
||||
if !errors.As(err, &withPath) {
|
||||
break
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
num_barbarian_villages: 44
|
||||
num_bonus_villages: 0
|
||||
created_at: 2022-01-19T12:00:54.000Z
|
||||
player_data_updated_at: 2022-01-19T12:00:54.000Z
|
||||
player_data_synced_at: 2022-01-19T12:00:54.000Z
|
||||
player_snapshots_created_at: 2022-01-19T12:00:54.000Z
|
||||
tribe_data_updated_at: 2022-01-19T12:00:54.000Z
|
||||
tribe_data_synced_at: 2022-01-19T12:00:54.000Z
|
||||
tribe_snapshots_created_at: 2022-01-19T12:00:54.000Z
|
||||
village_data_updated_at: 2022-01-19T12:00:54.000Z
|
||||
ennoblement_data_updated_at: 2022-01-19T12:00:54.000Z
|
||||
village_data_synced_at: 2022-01-19T12:00:54.000Z
|
||||
ennoblement_data_synced_at: 2022-01-19T12:00:54.000Z
|
||||
version_code: de
|
||||
- _id: de188
|
||||
key: de188
|
||||
|
@ -31,12 +31,12 @@
|
|||
num_barbarian_villages: 1180
|
||||
num_bonus_villages: 512
|
||||
created_at: 2022-03-19T12:00:54.000Z
|
||||
player_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
player_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:00:54.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:00:54.000Z
|
||||
village_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:00:54.000Z
|
||||
village_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:00:54.000Z
|
||||
version_code: de
|
||||
- _id: en113
|
||||
key: en113
|
||||
|
@ -50,12 +50,12 @@
|
|||
num_barbarian_villages: 700
|
||||
num_bonus_villages: 1024
|
||||
created_at: 2021-04-02T16:01:25.000Z
|
||||
player_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
player_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
player_snapshots_created_at: 2021-04-02T16:01:25.000Z
|
||||
tribe_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
tribe_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
tribe_snapshots_created_at: 2021-04-02T16:01:25.000Z
|
||||
village_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
ennoblement_data_updated_at: 2021-04-02T16:01:25.000Z
|
||||
village_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
ennoblement_data_synced_at: 2021-04-02T16:01:25.000Z
|
||||
version_code: en
|
||||
- _id: it70
|
||||
key: it70
|
||||
|
@ -69,12 +69,12 @@
|
|||
num_barbarian_villages: 1682
|
||||
num_bonus_villages: 256
|
||||
created_at: 2022-03-19T12:00:04.000Z
|
||||
player_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
player_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:00:04.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:00:04.000Z
|
||||
village_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:00:04.000Z
|
||||
village_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:00:04.000Z
|
||||
version_code: it
|
||||
- _id: pl169
|
||||
key: pl169
|
||||
|
@ -88,12 +88,12 @@
|
|||
num_barbarian_villages: 1574
|
||||
num_bonus_villages: 2048
|
||||
created_at: 2022-03-19T12:01:39.000Z
|
||||
player_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
player_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:01:39.000Z
|
||||
village_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
village_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
version_code: pl
|
||||
- model: Tribe
|
||||
rows:
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
num_bonus_villages: 13379
|
||||
created_at:
|
||||
version_code: pl
|
||||
player_data_updated_at: "{{ now }}"
|
||||
player_data_synced_at: "{{ now }}"
|
||||
player_snapshots_created_at: "{{ now }}"
|
||||
tribe_data_updated_at: "{{ now }}"
|
||||
tribe_data_synced_at: "{{ now }}"
|
||||
tribe_snapshots_created_at: "{{ now }}"
|
||||
village_data_updated_at: "{{ now }}"
|
||||
ennoblement_data_updated_at: "{{ now }}"
|
||||
village_data_synced_at: "{{ now }}"
|
||||
ennoblement_data_synced_at: "{{ now }}"
|
||||
- model: Ennoblement
|
||||
rows:
|
||||
# pl181
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
num_barbarian_villages: 1574
|
||||
num_bonus_villages: 2048
|
||||
created_at: 2022-03-19T12:01:39.000Z
|
||||
player_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
player_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
player_snapshots_created_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
tribe_snapshots_created_at: 2022-03-19T12:01:39.000Z
|
||||
village_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
ennoblement_data_updated_at: 2022-03-19T12:01:39.000Z
|
||||
village_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
ennoblement_data_synced_at: 2022-03-19T12:01:39.000Z
|
||||
version_code: pl
|
||||
- model: Tribe
|
||||
rows:
|
||||
|
|
Loading…
Reference in New Issue