mirror of
https://github.com/tuna/tunasync.git
synced 2025-07-12 03:28:51 +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 {
|
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...)
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user