Skip to content

Commit

Permalink
fix(task+action): remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ConsoleTVs committed Jul 30, 2024
1 parent 919e768 commit b79b1b3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
18 changes: 0 additions & 18 deletions action.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ import "time"
// on the task's output.
type Action func(scheduler *Scheduler, task *Task)

func (action Action) Remove() Action {
return func(scheduler *Scheduler, task *Task) {
scheduler.Remove(task)

if action != nil {
action(scheduler, task)
}
}
}

func (action Action) Continue() Action {
return func(scheduler *Scheduler, task *Task) {
if action != nil {
action(scheduler, task)
}
}
}

func (action Action) Add(tasks ...*Task) Action {
return func(scheduler *Scheduler, task *Task) {
scheduler.Add(tasks...)
Expand Down
12 changes: 0 additions & 12 deletions task.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,6 @@ func (tasks Tasks) Weight() uint64 {
return total
}

// LockedWeight returns the sum of all he
// weights of all the locked tasks in the list.
func (tasks Tasks) LockedWeight() uint64 {
total := uint64(0)

for _, task := range tasks.Locked() {
total += task.Weight()
}

return total
}

// Unlocked returns the tasks that are unlocked
func (tasks Tasks) Unlocked() Tasks {
unlocked := make(Tasks, 0)
Expand Down

0 comments on commit b79b1b3

Please # to comment.