Skip to content

Commit

Permalink
add cron server
Browse files Browse the repository at this point in the history
  • Loading branch information
limes-cloud committed Apr 17, 2024
1 parent c39f466 commit f3b378a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"

"github.com/go-kratos/kratos/v2"
"github.com/go-kratos/kratos/v2/config/file"
"github.com/go-kratos/kratos/v2/log"
"github.com/go-kratos/kratos/v2/transport/grpc"
"github.com/go-kratos/kratos/v2/transport/http"
configure "github.com/limes-cloud/configure/client"
"github.com/limes-cloud/kratosx"
"github.com/limes-cloud/kratosx/config"
_ "go.uber.org/automaxprocs"
Expand All @@ -20,7 +20,7 @@ import (

func main() {
app := kratosx.New(
kratosx.Config(file.NewSource("internal/server/conf/config.yaml")),
kratosx.Config(configure.NewFromEnv()),
kratosx.RegistrarServer(RegisterServer),
kratosx.Options(kratos.BeforeStop(func(ctx context.Context) error {
task.GlobalFactory().Close()
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.6.0
github.com/json-iterator/go v1.1.12
github.com/limes-cloud/configure/client v0.0.0-20231204173321-be74fe745740
github.com/limes-cloud/kratosx v1.0.27
go.uber.org/automaxprocs v1.5.3
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe
Expand Down Expand Up @@ -74,6 +75,7 @@ require (
github.com/jinzhu/now v1.1.5 // indirect
github.com/klauspost/compress v1.17.5 // indirect
github.com/lib/pq v1.10.6 // indirect
github.com/limes-cloud/configure v1.0.12 // indirect
github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand All @@ -90,7 +92,6 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/shirou/gopsutil/v3 v3.24.1 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,10 @@ github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmt
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs=
github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/limes-cloud/configure v1.0.12 h1:Z1Et21YIa0NdBb+lqA8mG7psllaH65Djaqthjb+Qzgw=
github.com/limes-cloud/configure v1.0.12/go.mod h1:dlx/YoAfRrQlMfj/O6N4NdnNk4qwnRKH62u9Hqnw+3g=
github.com/limes-cloud/configure/client v0.0.0-20231204173321-be74fe745740 h1:JqfH8f6MhFYp+d1GT9MciWpDE+nVGnjYuEhVObFJ7Jk=
github.com/limes-cloud/configure/client v0.0.0-20231204173321-be74fe745740/go.mod h1:cXxBQgSNr7qzejqnScAcogMsUmOybJLvI8cJCByWQws=
github.com/limes-cloud/kratosx v1.0.27 h1:8q/K1QEPghffO4ZcihixWXSqSyG4lqkCEUkimlAPJgM=
github.com/limes-cloud/kratosx v1.0.27/go.mod h1:yOXNr410UoLFV+31y0lCD8xerDj2J1E+Mr/XvUYdf9g=
github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo=
Expand Down

0 comments on commit f3b378a

Please sign in to comment.