Some known issues have been fixed

This commit is contained in:
kebyn
2022-03-12 13:24:57 +00:00
parent d8b2675fda
commit 0c46714fd6
2 changed files with 4 additions and 5 deletions

View File

@ -114,9 +114,7 @@ func (p *twoStageRsyncProvider) Options(stage int) ([]string, error) {
if !ok { if !ok {
return nil, errors.New("invalid stage 1 profile") return nil, errors.New("invalid stage 1 profile")
} }
for _, exc := range stage1Profile { options = append(options, stage1Profile...)
options = append(options, exc)
}
} else if stage == 2 { } else if stage == 2 {
options = append(options, p.stage2Options...) options = append(options, p.stage2Options...)

View File

@ -317,7 +317,8 @@ func (w *Worker) runSchedule() {
schedInfo := w.schedule.GetJobs() schedInfo := w.schedule.GetJobs()
w.updateSchedInfo(schedInfo) w.updateSchedInfo(schedInfo)
tick := time.Tick(5 * time.Second) tick := time.NewTicker(5 * time.Second)
defer tick.Stop()
for { for {
select { select {
case jobMsg := <-w.managerChan: case jobMsg := <-w.managerChan:
@ -356,7 +357,7 @@ func (w *Worker) runSchedule() {
schedInfo = w.schedule.GetJobs() schedInfo = w.schedule.GetJobs()
w.updateSchedInfo(schedInfo) w.updateSchedInfo(schedInfo)
case <-tick: case <-tick.C:
// check schedule every 5 seconds // check schedule every 5 seconds
if job := w.schedule.Pop(); job != nil { if job := w.schedule.Pop(); job != nil {
job.ctrlChan <- jobStart job.ctrlChan <- jobStart