summaryrefslogtreecommitdiff
path: root/internal/server
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/continuous.go2
-rw-r--r--internal/server/handlers/controlhandler.go2
-rw-r--r--internal/server/handlers/serverhandler.go2
-rw-r--r--internal/server/scheduler.go2
4 files changed, 6 insertions, 2 deletions
diff --git a/internal/server/continuous.go b/internal/server/continuous.go
index 583d136..f75c732 100644
--- a/internal/server/continuous.go
+++ b/internal/server/continuous.go
@@ -92,7 +92,7 @@ func (c *continuous) runJob(ctx context.Context, job config.Continuous) {
}
logger.Info(fmt.Sprintf("Starting job %s", job.Name))
- status := client.Start(jobCtx, make(chan struct{}))
+ status := client.Start(jobCtx, make(chan string))
logMessage := fmt.Sprintf("Job exited with status %d", status)
if status != 0 {
diff --git a/internal/server/handlers/controlhandler.go b/internal/server/handlers/controlhandler.go
index 9a8eb75..8cc5a40 100644
--- a/internal/server/handlers/controlhandler.go
+++ b/internal/server/handlers/controlhandler.go
@@ -41,10 +41,12 @@ func NewControlHandler(user *user.User) *ControlHandler {
return &h
}
+// Shutdown the handler.
func (h *ControlHandler) Shutdown() {
h.done.Shutdown()
}
+// Done channel of the handler.
func (h *ControlHandler) Done() <-chan struct{} {
return h.done.Done()
}
diff --git a/internal/server/handlers/serverhandler.go b/internal/server/handlers/serverhandler.go
index 843eabc..5cf8041 100644
--- a/internal/server/handlers/serverhandler.go
+++ b/internal/server/handlers/serverhandler.go
@@ -72,10 +72,12 @@ func NewServerHandler(user *user.User, catLimiter, tailLimiter, globalServerWait
return &h
}
+// Shutdown the handler.
func (h *ServerHandler) Shutdown() {
h.done.Shutdown()
}
+// Done channel of the handler.
func (h *ServerHandler) Done() <-chan struct{} {
return h.done.Done()
}
diff --git a/internal/server/scheduler.go b/internal/server/scheduler.go
index 9d76a3b..a1e9e36 100644
--- a/internal/server/scheduler.go
+++ b/internal/server/scheduler.go
@@ -93,7 +93,7 @@ func (s *scheduler) runJobs(ctx context.Context) {
defer cancel()
logger.Info(fmt.Sprintf("Starting job %s", job.Name))
- status := client.Start(jobCtx, make(chan struct{}))
+ status := client.Start(jobCtx, make(chan string))
logMessage := fmt.Sprintf("Job exited with status %d", status)
if status != 0 {