Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Exesh/internal/scheduler/execution_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ func (s *ExecutionScheduler) runExecutionScheduler(ctx context.Context) error {
}

if s.getNowExecutions() == s.cfg.MaxConcurrency {
s.log.Info("skip execution scheduler loop (max concurrency reached)")
s.log.Debug("skip execution scheduler loop (max concurrency reached)")
continue
}

s.log.Info("begin execution scheduler loop", slog.Int("now_executions", s.getNowExecutions()))
s.log.Debug("begin execution scheduler loop", slog.Int("now_executions", s.getNowExecutions()))

s.changeNowExecutions(+1)
if err := s.unitOfWork.Do(ctx, func(ctx context.Context) error {
Expand Down
8 changes: 4 additions & 4 deletions Exesh/internal/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ func (w *Worker) runHeartbeat(ctx context.Context) {
}

if w.getFreeSlots() == 0 {
w.log.Info("skip heartbeat loop (no free slots)")
w.log.Debug("skip heartbeat loop (no free slots)")
continue
}

w.log.Info("begin heartbeat loop")
w.log.Debug("begin heartbeat loop")

w.mu.Lock()

Expand Down Expand Up @@ -121,13 +121,13 @@ func (w *Worker) runWorker(ctx context.Context) {

job := w.jobs.Dequeue()
if job == nil {
w.log.Info("skip worker loop (no jobs to do)")
w.log.Debug("skip worker loop (no jobs to do)")
w.changeFreeSlots(+1)
continue
}

js, _ := json.Marshal(job)
w.log.Info("picked job", slog.Any("job_id", (*job).GetID()), slog.String("job", string(js)))
w.log.Debug("picked job", slog.Any("job_id", (*job).GetID()), slog.String("job", string(js)))

result := w.jobExecutor.Execute(ctx, *job)

Expand Down
Loading