调整框架的超时为 15秒

This commit is contained in:
eson
2023-07-12 10:22:03 +08:00
parent a4f429a528
commit 55eabd5cae
20 changed files with 47 additions and 14 deletions

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/backend/internal/config"
"fusenapi/server/backend/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/canteen/internal/config"
"fusenapi/server/canteen/internal/handler"
@@ -20,7 +21,10 @@ func main() {
flag.Parse()
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -8,6 +8,7 @@ import (
svc2 "fusenapi/server/data-transfer/internal/svc"
"fusenapi/utils/auth"
"net/http"
"time"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
@@ -20,6 +21,7 @@ func main() {
var c config2.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/home-user-auth/internal/config"
"fusenapi/server/home-user-auth/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/inventory/internal/config"
"fusenapi/server/inventory/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/map-library/internal/config"
"fusenapi/server/map-library/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/orders/internal/config"
"fusenapi/server/orders/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/product-model/internal/config"
"fusenapi/server/product-model/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/product-template/internal/config"
"fusenapi/server/product-template/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/product/internal/config"
"fusenapi/server/product/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/shopping-cart-confirmation/internal/config"
"fusenapi/server/shopping-cart-confirmation/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/upload/internal/config"
"fusenapi/server/upload/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {

View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/server/webset/internal/config"
"fusenapi/server/webset/internal/handler"
@@ -21,6 +22,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {