-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
Support CanDOTimeout
- set timeout for every running job - monitor all running job & remove if timeout expire
pkg/server/server.go
Outdated
j, ok := jb.(*Job) | ||
if !ok { | ||
log.Errorln("invalid job") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for one invalid jobs this is not loading the next ok jobs. print log and may be continue
instead of return
pkg/server/server.go
Outdated
sj, ok := sji.(*CronJob) | ||
if !ok { | ||
log.Errorln("invalid cronjob") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for one invalid jobs this is not loading the next ok jobs. print log and may be continue instead of return
pkg/server/server.go
Outdated
@@ -93,6 +117,7 @@ func (s *Server) Start(addr string) { | |||
|
|||
go registerWebHandler(s) | |||
go s.WatcherLoop() | |||
go s.JobTimeoutMonitorLoop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to WatchJobTimeout
pkg/server/server.go
Outdated
} | ||
|
||
func (s *Server) JobTimeoutMonitorLoop() { | ||
ticker := time.NewTicker(time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of two block of code do
for tick := range time.NewTicker(time.Second) { ... }
b79c2ed
to
15f3e20
Compare
…ob functions Signed-off-by: sadlil <[email protected]>
No description provided.