worker: Make BasePath configurable
This commit is contained in:
parent
6ce20a9ef6
commit
ce7ac9a756
11 changed files with 106 additions and 25 deletions
|
|
@ -41,12 +41,15 @@ type JobStatus struct {
|
|||
var ErrInvalidToken = errors.New("token does not exist")
|
||||
var ErrJobNotRunning = errors.New("job isn't running")
|
||||
|
||||
func NewServer(logger *log.Logger, jobs jobqueue.JobQueue, artifactsDir string) *Server {
|
||||
func NewServer(logger *log.Logger, jobs jobqueue.JobQueue, artifactsDir string, basePath string) *Server {
|
||||
s := &Server{
|
||||
jobs: jobs,
|
||||
logger: logger,
|
||||
artifactsDir: artifactsDir,
|
||||
}
|
||||
|
||||
api.BasePath = basePath
|
||||
|
||||
go s.WatchHeartbeats()
|
||||
return s
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue