From 4ab86f0372065ff9a591d6b8e8b444c1d7aad61c Mon Sep 17 00:00:00 2001 From: Arinda Arif <79823430+arinda-arif@users.noreply.github.com> Date: Wed, 29 Mar 2023 17:03:29 +0700 Subject: [PATCH] fix: replay manual job and timeout issue (#767) * fix: ignore job that does not have schedule from replay tree Co-authored-by: Sandeep Bhardwaj * chore: increase write and idle server timeout Co-authored-by: Sandeep Bhardwaj --------- Co-authored-by: Sandeep Bhardwaj --- job/replay.go | 3 +++ server/server.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/job/replay.go b/job/replay.go index b90e74eb46..45071001ed 100644 --- a/job/replay.go +++ b/job/replay.go @@ -110,6 +110,9 @@ func findOrCreateDAGNode(dagTree *tree.MultiRootTree, dagSpec models.JobSpec) *t func populateDownstreamRuns(parentNode *tree.TreeNode) (*tree.TreeNode, error) { for idx, childNode := range parentNode.Dependents { childDag := childNode.Data.(models.JobSpec) + if childDag.Schedule.Interval == "" { + continue + } taskSchedule, err := cron.ParseCronSchedule(childDag.Schedule.Interval) if err != nil { return nil, err diff --git a/server/server.go b/server/server.go index 249a86b576..7ea5f36977 100644 --- a/server/server.go +++ b/server/server.go @@ -169,8 +169,8 @@ func prepareHTTPProxy(grpcAddr string, grpcServer *grpc.Server) (*http.Server, f Handler: grpcHandlerFunc(grpcServer, baseMux), Addr: grpcAddr, ReadTimeout: 5 * time.Second, - WriteTimeout: 60 * time.Second, - IdleTimeout: 120 * time.Second, + WriteTimeout: 30 * time.Minute, + IdleTimeout: 5 * time.Minute, } return srv, cleanup, nil