mirror of
https://github.com/tuna/tunasync.git
synced 2025-07-11 19:08:53 +00:00
Some known issues have been fixed
This commit is contained in:
@ -114,9 +114,7 @@ func (p *twoStageRsyncProvider) Options(stage int) ([]string, error) {
|
||||
if !ok {
|
||||
return nil, errors.New("invalid stage 1 profile")
|
||||
}
|
||||
for _, exc := range stage1Profile {
|
||||
options = append(options, exc)
|
||||
}
|
||||
options = append(options, stage1Profile...)
|
||||
|
||||
} else if stage == 2 {
|
||||
options = append(options, p.stage2Options...)
|
||||
|
@ -317,7 +317,8 @@ func (w *Worker) runSchedule() {
|
||||
schedInfo := w.schedule.GetJobs()
|
||||
w.updateSchedInfo(schedInfo)
|
||||
|
||||
tick := time.Tick(5 * time.Second)
|
||||
tick := time.NewTicker(5 * time.Second)
|
||||
defer tick.Stop()
|
||||
for {
|
||||
select {
|
||||
case jobMsg := <-w.managerChan:
|
||||
@ -356,7 +357,7 @@ func (w *Worker) runSchedule() {
|
||||
schedInfo = w.schedule.GetJobs()
|
||||
w.updateSchedInfo(schedInfo)
|
||||
|
||||
case <-tick:
|
||||
case <-tick.C:
|
||||
// check schedule every 5 seconds
|
||||
if job := w.schedule.Pop(); job != nil {
|
||||
job.ctrlChan <- jobStart
|
||||
|
Reference in New Issue
Block a user