Skip to content

Commit

Permalink
update all
Browse files Browse the repository at this point in the history
  • Loading branch information
eatmeatball committed Jun 30, 2024
1 parent 7a4bf84 commit 6982fa1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jobmanager/job_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ func JobStop(jobId string) error {
return nil
}

func StopAll() {
jobManager.Range(func(key, value any) bool {
if jh, ok := value.(*jobHandle); ok {
jh.StopJob()
}
return true
})
}

func RunStartTime() time.Time {
return startTime
}
Expand Down
1 change: 1 addition & 0 deletions jobmanagerserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func ServeStop() {
if err := srv.Shutdown(ctx); err != nil {
slog.Info("Server Shutdown:", "err", err.Error())
}
jobmanager.StopAll()
}

type fsFunc func(name string) (fs.File, error)
Expand Down

0 comments on commit 6982fa1

Please sign in to comment.