(service swarm.Service, progressOut progress.Output)
| 572 | } |
| 573 | |
| 574 | func newReplicatedJobProgressUpdater(service swarm.Service, progressOut progress.Output) *replicatedJobProgressUpdater { |
| 575 | concurrent := int(*service.Spec.Mode.ReplicatedJob.MaxConcurrent) |
| 576 | total := int(*service.Spec.Mode.ReplicatedJob.TotalCompletions) |
| 577 | |
| 578 | return &replicatedJobProgressUpdater{ |
| 579 | progressOut: progressOut, |
| 580 | concurrent: concurrent, |
| 581 | total: total, |
| 582 | jobIteration: service.JobStatus.JobIteration.Index, |
| 583 | progressDigits: len(strconv.Itoa(total)), |
| 584 | activeDigits: len(strconv.Itoa(concurrent)), |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | // update writes out the progress of the replicated job. |
| 589 | func (u *replicatedJobProgressUpdater) update(_ swarm.Service, tasks []swarm.Task, _ map[string]struct{}, _ bool) (bool, error) { |
no outgoing calls
searching dependent graphs…