Skip to content

Commit

Permalink
fix: change ID to RunID
Browse files Browse the repository at this point in the history
  • Loading branch information
WangYihang committed Mar 8, 2024
1 parent ef9d95d commit 870fafb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

// Scheduler is a task scheduler
type Scheduler struct {
ID string
RunID string
NumWorkers int
OutputFilePath string
OutputFd io.WriteCloser
Expand Down Expand Up @@ -45,7 +45,7 @@ type Scheduler struct {
func NewScheduler() *Scheduler {
id := uuid.New().String()
return (&Scheduler{
ID: id,
RunID: id,
NumWorkers: 1,
Metadata: make(map[string]interface{}),
MaxRetries: 4,
Expand Down Expand Up @@ -186,7 +186,7 @@ func (s *Scheduler) Submit(task Task) {
index := s.CurrentIndex.Load()
if (index % s.NumShards) == s.Shard {
s.taskWg.Add(1)
s.TaskChan <- NewBasicTask(index, s.ID, task)
s.TaskChan <- NewBasicTask(index, s.RunID, task)
}
s.CurrentIndex.Add(1)
}
Expand Down

0 comments on commit 870fafb

Please sign in to comment.